home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / WWW / Perl_WWW_Utilities / MHonArc / doc / mhonarc.txt < prev    next >
Encoding:
Text File  |  1996-04-18  |  130.8 KB  |  4,594 lines

  1.  
  2.                                        
  3.                                     MHONARC
  4.                                        
  5.    
  6.    
  7.    An Internet mail-to-HTML converter.
  8.      _________________________________________________________________
  9.    
  10. Table of Contents
  11.  
  12.      * Introduction
  13.           + Why Use MHonArc?
  14.           + Supported Platforms
  15.           + Availability
  16.           + About the Documentation
  17.      * Installation
  18.           + System Requirements
  19.           + Extracting the Distribution File
  20.           + Installing the Software
  21.           + Tested Environments
  22.      * Quick Start
  23.           + Converting MH mail folders or Mailbox files
  24.           + Adding Messages to an Archive
  25.           + Converting a single message
  26.      * Overview
  27.           + Synopsis
  28.           + Options
  29.           + Environment
  30.      * Resource File
  31.           + Resource Syntax
  32.           + Resource Elements
  33.           + Example Resource File
  34.           + Notes on Resource File
  35.      * Adding Messages
  36.           + Examples
  37.      * Removing Messages
  38.           + Message Numbers
  39.           + Scanning an Archive
  40.      * Index Page Customization
  41.           + Filename
  42.           + Beginning Markup
  43.           + End Markup
  44.           + Include Files
  45.           + Listing Layout
  46.           + Icons
  47.           + Examples
  48.      * Thread Index Customization
  49.           + Filename
  50.           + Beginning Markup
  51.           + End Markup
  52.           + Listing Layout
  53.      * Message Customization
  54.           + Beginning Markup
  55.           + End Markup
  56.           + Header and Footer
  57.           + Navigational Links
  58.           + Message Layout
  59.           + Other Resources
  60.      * MIME
  61.           + Default Filters
  62.           + Non-MIME Messages
  63.           + Writing Filters
  64.           + Specifying Filters
  65.      * Gory Details
  66.           + OS Detection
  67.           + Processing Steps
  68.           + Archive Integrity
  69.           + File Formats
  70.           + Notes
  71.      * Diagnostics
  72.           + Informative messages
  73.           + Warnings
  74.           + Errors
  75.           + Perl Messages
  76.      * Glossary
  77.      * Contacts
  78.           + Mailing List
  79.           + People
  80.             
  81.    
  82.      _________________________________________________________________
  83.    
  84.     Earl Hood <ehood@convex.hp.com>
  85.     Hewlett-Packard Convex
  86.     3000 Waterview Parkway
  87.     P.O. Box 833851
  88.     Richardson, TX 75083-3851
  89.     
  90.     Phone: (214) 497-4387
  91.     FAX: (214) 497-4500
  92.     
  93.    
  94.      _________________________________________________________________
  95.    
  96.  
  97.      _________________________________________________________________
  98.    
  99.                                 INTRODUCTION
  100.                                        
  101.    
  102.    
  103.    MHonArc is a Perl program for converting e-mail messages as specified
  104.    in RFC 822 and RFC 1521 (MIME) to HTML. MHonArc can perform the
  105.    following tasks:
  106.      * Convert mh(1) mail folders or UUCP/Unix style mailboxes into an
  107.        HTML mail archive.
  108.      * Add or remove messages to an existing HTML mail archive generated
  109.        by MHonArc.
  110.      *
  111.        
  112.        Convert a single message to HTML.
  113.        
  114.    
  115.    
  116.    Along with these tasks, MHonArc provides the following:
  117.      * A main customizable index page for mail messages archived.
  118.      * A customizable thread index page listing messages by thread.
  119.      * Control over message formatting.
  120.      * The ability to hook in your own custom message filters.
  121.        
  122.    
  123.      _________________________________________________________________
  124.    
  125. Why Use MHonArc? 
  126.  
  127.    
  128.    
  129.    Here are some reasons for using MHonArc:
  130.      * You want to keep organized archives of mail messages and/or news
  131.        articles for a World Wide Web (WWW) server; complete with live
  132.        hypertext pointers to their authors and to any url's mentioned.
  133.      * You would like to control the layout of mail/news archives to keep
  134.        a consistent style to your WWW pages.
  135.      * You have a WWW client, but no MIME mail reader. MHonArc will allow
  136.        you to read MIME messages that includes images, audio, video, etc
  137.        via your Web client.
  138.      * Muli-platform support: MS-DOS and Unix.
  139.      * You think the MHonArc logo is really cool, and it deserves to be
  140.        used.
  141.      * You like Perl, and you want to see what it can do.
  142.      * Just cuz.
  143.        
  144.    
  145.      _________________________________________________________________
  146.    
  147. Supported Platforms 
  148.  
  149.    
  150.    
  151.    MHonArc (version 1.1, or later) will run under Unix or MS-DOS
  152.    operating systems with Perl 4 or 5 installed.
  153.      _________________________________________________________________
  154.    
  155. Availability 
  156.  
  157.    
  158.    
  159.    The latest information on MHonArc, and its availability, may be
  160.    obtained at <URL:http://www.oac.uci.edu/indiv/ehood/mhonarc.html>.
  161.      _________________________________________________________________
  162.    
  163. About the Documentation 
  164.  
  165.    
  166.    
  167.    The documentation is oriented towards Unix users. However, the section
  168.    on Installation does conver MS-DOS installation instructions. Notes
  169.    are made in the documentation when something may differ due to the
  170.    operating system.
  171.      _________________________________________________________________
  172.    
  173.  
  174.      _________________________________________________________________
  175.    
  176.                                 INSTALLATION
  177.                                        
  178.    
  179.    
  180.    This section instructs you on how to install and get MHonArc running
  181.    on your machine. The section covers Unix installation and
  182.    MS-DOS/Windows installation.
  183.    
  184.    NOTE
  185.           
  186.           
  187.           For brevity, anything that applies to MS-DOS also applies to
  188.           Windows.
  189.           
  190.    
  191.      _________________________________________________________________
  192.    
  193. System Requirements 
  194.  
  195.    
  196.    
  197.    MHonArc is written in Perl 4. Therefore, you must have Perl 4 or 5
  198.    installed on your system. If you do not know if Perl is installed on
  199.    your system, ask your system administrator.
  200.    
  201.    If Perl is not installed on your system, you can retrieve Perl at
  202.    <URL:http://www.cis.ufl.edu/perl/ftp.html>. I recommend version 4.0
  203.    patchlevel 34, or later. MHonArc has not been tested on earlier
  204.    versions.
  205.    
  206.    NOTE
  207.           
  208.           
  209.           MHonArc makes use of the Perl libraries newgetopt.pl and
  210.           timelocal.pl. These libraries are part of the normal Perl
  211.           distribution.
  212.           
  213.    
  214.      _________________________________________________________________
  215.    
  216. Extracting the Distribution File 
  217.  
  218.    
  219.    
  220.    Before extracting the distribution file, you may want copy the
  221.    distribution file into scratch directory, and work in there during
  222.    installation.
  223.    
  224.   TAR/GZIP DISTRIBUTION
  225.   
  226.    
  227.    
  228.    You must have gzip and tar installed on your system. If gzip is not
  229.    installed, you may obtain gzip at <URL:ftp://prep.ai.mit.edu/pub/gnu>.
  230.    Tar comes with all Unix systems. However, MS-DOS users may have to
  231.    obtain tar.
  232.    
  233.    To extract the file, type the following command at your shell's
  234.    prompt:
  235.    
  236.    Unix
  237.           
  238.           
  239.           zcat MHonArc.tar.gz | tar xvof -
  240.           
  241.    MS-DOS
  242.           
  243.           
  244.           gunzip -dv MHonArc.tar.gz
  245.           tar xvf MHonArc.tar
  246.           
  247.    
  248.    
  249.    A directory called "MHonArc" should be created. The directory contains
  250.    all the files need for installing MHonArc.
  251.    
  252.    NOTE
  253.           
  254.           
  255.           The actual name of the distribution file may differ from the
  256.           example given.
  257.           
  258.   ZIP DISTRIBUTION
  259.   
  260.    
  261.    
  262.    You must have pkzip or unzip installed on your system.
  263.    
  264.    To extract the file, type the following command at your shell's
  265.    prompt:
  266.    
  267.    unzip mhonarc.zip
  268.    
  269.    OR
  270.    
  271.    pkunzip -d mhonarc.zip
  272.    
  273.    IMPORTANT
  274.           
  275.           
  276.           The directory structure of the zip file must be preserved
  277.           during extraction to insure proper installation.
  278.           
  279.    
  280.    
  281.    A directory called "MHonArc" should be created. The directory contains
  282.    all the files need for installing MHonArc.
  283.    
  284.    NOTE
  285.           
  286.           
  287.           The actual name of the distribution file may differ from the
  288.           example given.
  289.           
  290.    
  291.      _________________________________________________________________
  292.    
  293. Installing the Software 
  294.  
  295.    
  296.    
  297.    Once you have extracted the distribution file, change your current
  298.    working directory into the MHonArc directory created during the
  299.    extraction of the distribution file.
  300.    
  301.    Example: Assuming you are in the directory you extracted the
  302.    distribution file in, you can type the following on your command-line:
  303.    
  304.    Unix
  305.           
  306.           
  307.           cd MHonArc
  308.           
  309.    MS-DOS
  310.           
  311.           
  312.           cd MHONARC
  313.           
  314.   INSTALL.ME
  315.   
  316.    
  317.    
  318.    Contained in the MHonArc directory is a Perl program called
  319.    "install.me". This program will perform the tasks required to install
  320.    MHonArc on you machine. The install program is capable of running
  321.    interactively, or in batch.
  322.    
  323.     Interactive Mode 
  324.     
  325.    
  326.    
  327.    To run install.me in interactive mode, type the following at your
  328.    shell's prompt:
  329.    
  330.    perl install.me
  331.    
  332.    NOTE
  333.           
  334.           
  335.           Make sure you are in the same directory as the install.me
  336.           program.
  337.           
  338.    
  339.    
  340.    The program will then prompt you for the necessary information to
  341.    install MHonArc on your system.
  342.    
  343.    Here's an example (Unix) session:
  344. % perl install.me
  345. MHonArc Installation
  346. ====================
  347. The installation process will ask you a series of questions on where
  348. the Perl executable is and where to put MHonArc files.  Just hit <CR>
  349. to accept the default values listed in ()'s.
  350.  
  351. If directory path does not exist on your system, the installation
  352. program will create the path for you.
  353.  
  354. -----------------------------------------------
  355. Note:  Make sure all pathnames are absolute.
  356. -----------------------------------------------
  357.  
  358. Hit <CR> to continue ...
  359. Perl executable ("/usr/local/bin/perl")
  360. -> /usr/bin/perl
  361. Location to install programs ("/usr/local/bin")
  362. -> /mnt/ehood/bin
  363. Location to install libraries ("/usr/local/lib/MHonArc")
  364. -> /mnt/ehood/lib/MHonArc
  365. Install documentation ("y")?  y
  366. Location to install docs ("/usr/local/lib/MHonArc/doc")
  367. -> /mnt/ehood/lib/MHonArc/doc
  368.  
  369. You've specified the following:
  370.         Perl location: /usr/bin/perl
  371.         Program directory: /mnt/ehood/bin
  372.         Library directory: /mnt/ehood/lib/MHonArc
  373.         Doc directory: /mnt/ehood/lib/MHonArc/doc
  374. Is this correct ("y")?  y
  375. Installing the following into /mnt/ehood/bin
  376.         mhonarc
  377. Installing the following into /mnt/ehood/lib/MHonArc
  378.         base64.pl
  379.         mhexternal.pl
  380.         mhtxthtml.pl
  381.         mhtxtplain.pl
  382.         mhtxtsetext.pl
  383.         qprint.pl
  384.         readmail.pl
  385. Installing the following into /mnt/ehood/lib/MHonArc/doc
  386.         mhonarc.txt
  387.         ...
  388.  
  389.     Batch Mode 
  390.     
  391.    
  392.    
  393.    To run install.me in batch mode, type the following at your shell's
  394.    prompt:
  395.    
  396.    perl install.me install.cfg
  397.    
  398.    NOTE
  399.           
  400.           
  401.           Make sure you are in the same directory as the install.me
  402.           program.
  403.           
  404.    
  405.    
  406.    The install.cfg contains the necessary information for intalling
  407.    MHonArc on your system. You will need to edit install.cfg to reflect
  408.    your installation requirements.
  409.    
  410.    Here is an example install.cfg:
  411. # Should executables be installed. 0 => NO, non-zero => YES.
  412. #
  413. $dobin = 1;
  414.  
  415. # Should libraries be installed. 0 => NO, non-zero => YES.
  416. #
  417. $dolib = 1;
  418.  
  419. # Should documentation be installed. 0 => NO, non-zero => YES.
  420. #
  421. $dodoc = 1;
  422.  
  423. # Location for executable.  If using ms-dos, use something like
  424. # 'C:\\BIN'.
  425. #
  426. $bindir  = '/usr/local/bin';
  427.  
  428. # Location for libraries.  If using ms-dos, use something like
  429. # 'C:\\LIB\\MHONARC'.
  430. #
  431. $libdir  = '/usr/local/lib/MHonArc';
  432.  
  433. # Location for documents.  If using ms-dos, use something like
  434. # 'C:\\DOC\\MHONARC'.
  435. #
  436. $docdir  = '/usr/local/lib/MHonArc/doc';
  437.  
  438. # Location of perl executable.  If using ms-dos, use something like
  439. # 'C:\\BIN\\PERL.EXE'.
  440. #
  441. $perlprg = '/usr/local/bin/perl';
  442.  
  443.  
  444. 1; # DO NOT DELETE THIS LINE
  445.  
  446.    
  447.    
  448.    The file is Perl code, and therefore, must follow Perl syntax rules:
  449.      * Anything following a `#' character is ignored.
  450.      * Strings values need to be enclosed in quotes.
  451.      * If you need to use a backslash in a string value, it must be
  452.        escaped with a backslash. Example: 'C:\\LIB\\MHONARC'. The same
  453.        applies to the '$' character.
  454.      * All statements must end with a semi-colon.
  455.      * The "1;" line must not be deleted.
  456.        
  457.    NOTE
  458.           
  459.           
  460.           You can verify the syntax of the configuration file by invoking
  461.           "perl -c" on the file.
  462.           
  463.    
  464.    
  465.    After you have successfully executed install.me, MHonArc is ready to
  466.    use.
  467.    
  468.     MS-DOS Post install.me Note
  469.     
  470.    
  471.    
  472.    If you would like the ability to run MHonArc like other programs, then
  473.    create a batch file that contains something like the following:
  474. @ECHO OFF
  475. C:\BIN\PERL.EXE C:\BIN\MHONARC %1 %2 %3 %4 %5 %6 %7 %8 %9
  476.  
  477.    
  478.    
  479.    Of course, you will need to change the paths to Perl and MHonArc to
  480.    suit your systems configuration.
  481.    
  482.    Sample batch files are available in the MHonArc distribution.
  483.    
  484.   NOTES ON INSTALL.ME
  485.      *
  486.        
  487.        If you do not know the location of the Perl executable on your
  488.        system, ask your system administrator.
  489.      *
  490.        
  491.        All pathnames must be absolute.
  492.      *
  493.        
  494.        If a path does not exist that you specify, the path will be
  495.        automatically created if running in interactive mode. In batch
  496.        mode, all paths specified must already exist.
  497.      *
  498.        
  499.        During the installation process, the main MHonArc source file is
  500.        modified to be aware of the location of the Perl executable and
  501.        MHonArc's library files. If you ever need to install MHonArc in
  502.        a different location, rerun the install.me program.
  503.        
  504.        NOTE: Location of the Perl exectuble is only relevant for Unix
  505.        systems. MS-DOS systems do not make use of the "#!" line in
  506.        scripts.
  507.      *
  508.        
  509.        MHonArc requires the use of timelocal.pl and newgetopt.pl. These
  510.        libraries are part of the normal Perl distribution.
  511.        
  512.    
  513.      _________________________________________________________________
  514.    
  515. Tested Environments 
  516.  
  517.    
  518.    
  519.    This section covers software environments MHonArc has worked
  520.    successfully. Feedback is welcome about other success, or failure,
  521.    stories covering MHonArc usage in other environments.
  522.    
  523.   PERL
  524.   
  525.    
  526.    
  527.    MHonArc is known to work with the following version of Perl 4, or
  528.    later:
  529.    
  530.    $RCSfile: perl.c,v $$Revision: 4.0.1.7 $$Date: 92/06/08 14:50:39 $
  531.    Patch level: 34
  532.    
  533.    MHonArc is known also to work with Perl 5.001m and Perl 5.002 beta2.
  534.    
  535.    NOTE
  536.           
  537.           
  538.           The version numbers are based upon the Unix versions of Perl.
  539.           DOS version numbers may differ.
  540.           
  541.   UNIX
  542.   
  543.     Mail Software
  544.      * MH
  545.      *
  546.        
  547.        Elm, Mail, mail, and any other mail software that stores e-mail in
  548.        UUCP style mailbox format. UUCP format is where mail messages are
  549.        separated by a line beginning with "From " (I.e. the word "From"
  550.        followed by a space). You may need to utilize the MSGSEP resource
  551.        if the message separator is different from standard mailbox files
  552.        (eg. MMDF format).
  553.        
  554.     News Software
  555.     
  556.    
  557.    
  558.    Different news software store messages differently. Messages are
  559.    either stored in a format similiar to MH or similiar to a mailbox
  560.    file:
  561.      *
  562.        
  563.        MH style is where the messages are stored in a directory with each
  564.        post a separate file, and each file has a numeric filename.
  565.      *
  566.        
  567.        Mailbox style is where messages are stored in a single file. You
  568.        may need to utilize the MSGSEP resource if the message separator
  569.        is different from standard mailbox files.
  570.        
  571.   MS-DOS
  572.   
  573.     Mail/News Software
  574.     
  575.    
  576.    
  577.    MHonArc has been tested under MS-DOS with message files created by the
  578.    following mail and news programs:
  579.      * Eudora
  580.      * WinVN
  581.      * Windows Trumpet
  582.      *
  583.        
  584.        NUPop
  585.        
  586.    
  587.    
  588.    It also works with individual RFC822 mail messages, but you must run
  589.    MHonArc without a batch file if you need to use redirection. For
  590.    example:
  591.    
  592.    perl c:\bin\mhonarc <one.msg >one.htm
  593.    perl c:\bin\mhonarc -add <one.msg
  594.    
  595.      _________________________________________________________________
  596.    
  597.  
  598.      _________________________________________________________________
  599.    
  600.                                  QUICK START
  601.                                        
  602.    
  603.    
  604.    This section will give you a "quick start" on using MHonArc. However,
  605.    I recommend reading through the entire documentation to take full
  606.    advantage of all the features of MHonArc.
  607.    
  608.    Before continuing, make sure MHonArc has been installed. See
  609.    Installation if MHonArc has not been installed on your machine.
  610.      _________________________________________________________________
  611.    
  612. Converting MH mail folders or Mailbox files 
  613.  
  614.    
  615.    
  616.    Since MHonArc supports MH mail folders and UUCP/Unix mailbox files,
  617.    the term "mail folder" will represent the MH mail folder or mailbox
  618.    file you want to process. To convert your mail folder to an HTML
  619.    archive, use the following:
  620.    
  621.    % mhonarc <path>/inbox
  622.    
  623.    Where <path> represents the path to the directory that contains the
  624.    mail folder inbox. If you are in the directory that contains inbox,
  625.    then you can leave out the "<path>/".
  626.    
  627.    MHonArc prints out messages showing its progress as your e-mail is
  628.    processed. When MHonArc finishes, the following files will be created:
  629.      *
  630.        
  631.        maillist.html: The main index file containing links to all mail
  632.        messages converted. Messages are listed with subjects and who the
  633.        messages are from. All messages are listed in sorted order by date
  634.        received/sent.
  635.      *
  636.        
  637.        threads.html: The file listing messages by thread.
  638.      *
  639.        
  640.        msg*.html: HTML versions of the mail messages, where * represents
  641.        a message number from 0 to the number of message processed minus
  642.        1.
  643.      *
  644.        
  645.        .mhonarc.db (or MHONARC.DB under MS-DOS): This database file is
  646.        needed inorder for MHonArc to perform additions of new mail
  647.        messages to the archive. Information is stored to perform mail
  648.        threading updates when new messages are added, as well as any
  649.        resources set via Environment variables, Resource File, and/or
  650.        command-line Options.
  651.      *
  652.        
  653.        Other: Depending on the content-types of the e-mail messages
  654.        converted, other files may be created for images, videos,
  655.        binaries, etc. See the section on MIME for more information.
  656.        
  657.    
  658.    
  659.    The format of each converted mail message is as follows:
  660.      *
  661.        
  662.        A <LINK REV="made" HREF="mailto:from_address"> is inserted in the
  663.        HEAD element of HTML mail message file. This allows readers of the
  664.        message to send comments to the author of the mail message within
  665.        Web browsers that support such functionality (like Lynx).
  666.      *
  667.        
  668.        The title (i.e. TITLE element) contains the subject of the
  669.        message.
  670.      *
  671.        
  672.        Hyperlinks to the previous and next messages and the index pages
  673.        are located at the top of the message.
  674.      *
  675.        
  676.        Next, the subject appears in a H1 element.
  677.      *
  678.        
  679.        Next, follows the mail header with fields listed in a UL element
  680.        surrounded by HR's.
  681.      *
  682.        
  683.        Next, the actual body of the mail message.
  684.      *
  685.        
  686.        Next, links to any follow-up, or referenced, messages. The
  687.        messages are listed by subject and who they are from. These links
  688.        allows you to easily follow mail threads.
  689.      *
  690.        
  691.        Last, are verbose links to the previous mail message, next mail
  692.        message, and index pages.
  693.        
  694.    
  695.    
  696.    The following is also done for each mail message processed:
  697.      *
  698.        
  699.        Links are created in the "References" and "In-Reply-To" header
  700.        fields, and possibly the message body, if the destination
  701.        message-ids are being processed.
  702.      *
  703.        
  704.        E-mail addresses are converted to "mailto" hyperlinks in "To:",
  705.        "From:", "Cc:", and "Sender:" mail header fields. Currently, not
  706.        all Web browsers support the mailto URL.
  707.      *
  708.        
  709.        Newsgroups listed in a "Newsgroups:" mail header field are
  710.        converted to news hyperlinks.
  711.        
  712.    
  713.    
  714.    MHonArc allows you to specify more than one mail folder to process on
  715.    the command-line.
  716.    
  717.    Example
  718.           
  719.           
  720.           % mhonarc /home/ehood/mail/inbox1 /home/ehood/mail/inbox2 ...
  721.           
  722.    
  723.    
  724.    All the files created will be put into the current working directory,
  725.    by default. You can control the destination of the output location by
  726.    using the -outdir option.
  727.    
  728.    Example
  729.           
  730.           
  731.           % mhonarc -outdir /home/ehood/htmlarchive
  732.           /home/ehood/mail/inbox
  733.           
  734.    
  735.    
  736.    Here is a sample session converting a mail folder:
  737. % mhonarc ~/mail/inbox
  738. Requiring MIME filter libraries ...
  739.         mhexternal.pl
  740.         mhtxthtml.pl
  741.         mhtxtplain.pl
  742.         mhtxtsetext.pl
  743. Converting messages to ./maillist.html
  744. Reading /mnt/ehood/mail/inbox ..........
  745. Writing mail ...
  746. Writing tmp/maillist.html ...
  747. Writing tmp/threads.html ...
  748. 10 messages
  749.  
  750.    
  751.      _________________________________________________________________
  752.    
  753. Adding Messages to an Archive 
  754.  
  755.    
  756.    
  757.    If you have new messages you want to add to an existing archive, you
  758.    must utilizing the -add command-line option. With the -add, you can do
  759.    the following:
  760.      *
  761.        
  762.        Add a mail folder to an archive, or
  763.      *
  764.        
  765.        Add a single message to an archive.
  766.        
  767.    
  768.    
  769.    Adding a mail folder to an archive in the current working directory
  770.    can be done like the following:
  771.    
  772.    % mhonarc -add <path>/mailfolder
  773.    
  774.    If you are not in the same directory as the archive, then you can
  775.    specify the location of the archive to add to with the -outdir option:
  776.    
  777.    
  778.    % mhonarc -add -outdir <outdir_path> <path>/mailfolder
  779.    
  780.    NOTE
  781.           
  782.           
  783.           MHonArc will skip any messages that already exist in the
  784.           archive. Therefore, MHonArc can be used to rescan the same mail
  785.           folder and only convert any new messages it finds.
  786.           
  787.    
  788.    
  789.    If no mail folder arguments are specified, then MHonArc will attempt
  790.    to add a single message read in from standard input.
  791.    
  792.    Example
  793.           
  794.           
  795.           % mhonarc -add < single.msg
  796.           
  797.           Or, from a pipe:
  798.           
  799.           % cat single.msg | mhonarc -add
  800.           
  801.    
  802.    
  803.    See the section on Adding Messages for more information and examples
  804.    for adding messages to an archive.
  805.      _________________________________________________________________
  806.    
  807. Converting a single message 
  808.  
  809.    
  810.    
  811.    MHonArc has the ability to process a single mail message independent
  812.    of creating, or modifying, and archive. To convert a single message to
  813.    HTML use the -single command-line option. The message to process can
  814.    be specified by a filename on the command-line, or by reading the
  815.    message from standard input if no file is specified. The filtered
  816.    message is sent to standard output. All formatting options apply to
  817.    the single message as with messages being processed for an archive,
  818.    with the exception of formatting related specificly to archive
  819.    processing, like index links and mail thread links.
  820.    
  821.   EXAMPLES
  822.   
  823.    Input from standard input:
  824.           
  825.           
  826.           % mhonarc -single < messagefile > file.html
  827.           
  828.    Filename on command-line:
  829.           
  830.           
  831.           % mhonarc -single messagefile > file.html
  832.           
  833.    
  834.      _________________________________________________________________
  835.    
  836.  
  837.      _________________________________________________________________
  838.    
  839.                                   OVERVIEW
  840.                                        
  841.    
  842.    
  843.    This section gives an overview of MHonArc's command-line options and
  844.    environment variables. The MHonArc resource file is covered in the
  845.    section Resource File. The resource file allows you to specify most of
  846.    the resources set by environment variables and command-line options,
  847.    plus it give you the capability of completely customizing the HTML
  848.    output generated by MHonArc.
  849.      _________________________________________________________________
  850.    
  851. Synopsis 
  852.  
  853.    
  854.    
  855.    Invoke MHonArc from your shell with the following syntax:
  856.    
  857.    % mhonarc [options] mhfolder...
  858.    % mhonarc [options] mailbox ...
  859.    % mhonarc -add [options] < message
  860.    % mhonarc -single [options] < message > message.html
  861.    % mhonarc -single [options] message > message.html
  862.    % mhonarc -rmm [options] msg# ...
  863.    
  864.      _________________________________________________________________
  865.    
  866. Options
  867.  
  868.    
  869.    
  870.    The following options are available:
  871.    
  872.   -ADD
  873.   
  874.    
  875.    
  876.    Add new messages to an existing archive. If no mail folder arguments
  877.    are given, MHonArc assumes that a single message is being added to the
  878.    archive via standard input. Otherwise, MHonArc adds the messages
  879.    contained in the mail folders specified.
  880.    
  881.   -DBFILE NAME
  882.   
  883.    
  884.    
  885.    Use name for the name of MHonArc database file. The default is
  886.    ".mhonarc.db" (or "MHONARC.DB" under MS-DOS).
  887.    
  888.    NOTE
  889.           
  890.           
  891.           You should not override the default name unless absolutely
  892.           necessary, and you are confident about what you are doing.
  893.           
  894.   -DOCURL URL
  895.   
  896.    
  897.    
  898.    Use url as the URL to MHonArc documentation. The default is
  899.    "http://www.oac.uci.edu/indiv/ehood/mhonarc.html".
  900.    
  901.   -EDITIDX
  902.   
  903.    
  904.    
  905.    This option tells MHonArc to rewrite the index page and re-edit all
  906.    mail messages in the archive. This option is useful if you need to
  907.    change the layout of the index page and/or messages.
  908.    
  909.   -FOOTER FILENAME
  910.   
  911.    
  912.    
  913.    Insert contents of filename at the bottom of the index page. See
  914.    Include Files in Index Page Customization for more information about
  915.    the footer file.
  916.    
  917.   -FORCE
  918.   
  919.    
  920.    
  921.    Override a lock on an archive if attempts to lock fail. I.e. After
  922.    trying unsuccessfully to lock an archive, MHonArc will still perform
  923.    the actions requested.
  924.    
  925.    This option is useful to help dealing with locks that are no longer
  926.    valid (i.e. stale locks). A stale lock can exist if the MHonArc
  927.    process that created the lock abnormally terminated and could not
  928.    perform the proper cleanup procedures.
  929.    
  930.   -GENIDX
  931.   
  932.    
  933.    
  934.    Output an index page to standard output based upon the contents of an
  935.    archive, and utilizing any extra formatting options specified.
  936.    
  937.   -HEADER FILENAME
  938.   
  939.    
  940.    
  941.    Insert contents of filename at the beginning of the index page. See
  942.    Include Files in Index Page Customization for more information about
  943.    the header file.
  944.    
  945.   -HELP
  946.   
  947.    
  948.    
  949.    Print out a help message about MHonArc.
  950.    
  951.   -IDXFNAME NAME
  952.   
  953.    
  954.    
  955.    Sets the name of the main index file to name. The default is
  956.    "maillist.html".
  957.    
  958.   -IDXSIZE #
  959.   
  960.    
  961.    
  962.    Set the maximum number of messages listed in the indexes.
  963.    
  964.   -LOCKDELAY #
  965.   
  966.    
  967.    
  968.    The sleep time, in seconds, between attempts to lock the archive. The
  969.    default value is 3.
  970.    
  971.   -LOCKTRIES #
  972.   
  973.    
  974.    
  975.    Set the number of time MHonArc tries to lock a mail archive before
  976.    processing new messages. The default value is 10. MHonArc waits
  977.    approximately 3 seconds before each try.
  978.    
  979.    See Archive Integrity for more information on the -locktries options.
  980.    
  981.   -MAILTOURL URL
  982.   
  983.    
  984.    
  985.    Use url for e-mail address hyperlinks in mail message headers. The url
  986.    can contain the following variables that get expanded during run-time:
  987.    
  988.    $FROM$
  989.           
  990.           
  991.           Who the message is from.
  992.           
  993.    $MSGID$
  994.           
  995.           
  996.           Message ID of the message.
  997.           
  998.    $SUBJECT$
  999.           
  1000.           
  1001.           The subject of the message.
  1002.           
  1003.    $TO$
  1004.           
  1005.           
  1006.           Destination e-mail address of link.
  1007.           
  1008.    
  1009.    
  1010.    The default URL is "mailto:$TO$"
  1011.    
  1012.    The -mailtourl option has no effect if the -nomailto option is
  1013.    specified.
  1014.    
  1015.   -MAXSIZE #
  1016.   
  1017.    
  1018.    
  1019.    Set the maxinum number of messages allowed in the archive to #. If
  1020.    messages are added to the archive which would cause the total number
  1021.    of messages to exceed #, older messages (based on sort method) are
  1022.    removed automatically.
  1023.    
  1024.   -MSGSEP EXPRESSION
  1025.   
  1026.    
  1027.    
  1028.    Use the expression as the Perl regular expression that signifies the
  1029.    message separator in Unix mailbox files. The default expression is
  1030.    "^From " (minus the quotes).
  1031.    
  1032.    NOTE
  1033.           
  1034.           
  1035.           There is a space character after the From.
  1036.           
  1037.   -NODOC
  1038.   
  1039.    
  1040.    
  1041.    Do not print link to documentation at end of index page.
  1042.    
  1043.   -NOMAILTO
  1044.   
  1045.    
  1046.    
  1047.    Do not convert e-mail addresses in mail headers to mailto hyperlinks.
  1048.    
  1049.   -NONEWS
  1050.   
  1051.    
  1052.    
  1053.    Do not convert newsgroups in the Newsgroups: mail header field to news
  1054.    hyperlinks.
  1055.    
  1056.   -NOREVERSE
  1057.   
  1058.    
  1059.    
  1060.    Do not perform a reverse listing of the mail messages in the index
  1061.    page.
  1062.    
  1063.   -NOSORT
  1064.   
  1065.    
  1066.    
  1067.    Do not sort messages by date. Messages will be in the order they
  1068.    appear in the mailboxes/folders. By default, MHonArc sorts messages by
  1069.    date sent/received.
  1070.    
  1071.    -nosort takes precedence over the -sort option.
  1072.    
  1073.   -NOTHREAD
  1074.   
  1075.    
  1076.    
  1077.    Do not create a thread index page.
  1078.    
  1079.   -NOTSUBSORT
  1080.   
  1081.    
  1082.    
  1083.    Do not sort threads by subject on thread index page.
  1084.    
  1085.   -NOTREVERSE
  1086.   
  1087.    
  1088.    
  1089.    List threads in the thread index with oldest thread first.
  1090.    
  1091.   -OUTDIR PATH
  1092.   
  1093.    
  1094.    
  1095.    Set destination/location of the HTML mail archive to path. By default,
  1096.    the current working directory is used.
  1097.    
  1098.   -QUIET
  1099.   
  1100.    
  1101.    
  1102.    Suppress processing messages when MHonArc is running.
  1103.    
  1104.   -RCFILE FILE
  1105.   
  1106.    
  1107.    
  1108.    Use file as the resource file for MHonArc. MHonArc does the following
  1109.    to determine the location of file:
  1110.     1. If its an absolute pathname, use it.
  1111.     2. If it is a relative pathname, check for it relative to the current
  1112.        working directory.
  1113.     3. Otherwise, check for it relative to the location of the archive.
  1114.        
  1115.    
  1116.    
  1117.    See Resource File for more information. There is no default resource
  1118.    file.
  1119.    
  1120.   -REVERSE
  1121.   
  1122.    
  1123.    
  1124.    List messages in reverse order of the sorting option specified. For
  1125.    example, if date sorting is specified, -reverse will cause messages to
  1126.    be listed in reverse chronological order.
  1127.    
  1128.   -RMM
  1129.   
  1130.    
  1131.    
  1132.    All non-option command-line arguments are treated as messages to
  1133.    remove from the archive. Messages to remove are denoted by their
  1134.    message numbers.
  1135.    
  1136.   -SAVEMEM
  1137.   
  1138.    
  1139.    
  1140.    Normally, all messages are stored in memory and then written in one
  1141.    shot. This option causes MHonArc to write the message data as it is
  1142.    processesd. This option will cause a slow down in execution time as
  1143.    more disk I/O required, but it may allow large amounts of data to be
  1144.    processed in a single process if memory is limited.
  1145.    
  1146.    NOTE
  1147.           
  1148.           
  1149.           The reason more disk I/O is required is that when the message
  1150.           data is first written, all the archive navigational link
  1151.           information is non-existant. The information required to
  1152.           correctly generate the navigational link information will not
  1153.           exist until all messages are processed. Therefore, each new
  1154.           message file must be reopened to add in the navigational link
  1155.           information after all messages are processed.
  1156.           
  1157.   -SCAN
  1158.   
  1159.    
  1160.    
  1161.    List contents of archive to standard output.
  1162.    
  1163.   -SINGLE
  1164.   
  1165.    
  1166.    
  1167.    Convert a single mail message to HTML. The message can be specified by
  1168.    a filename on the command-line, or read from standard input if no file
  1169.    is given. The filtered message is sent to standard output.
  1170.    
  1171.    The -single option is useful tp convert individual messages to HTML
  1172.    not related to a specific mail archive. Any option related to how
  1173.    message formatting can be used with the -single option.
  1174.    
  1175.    The -single takes precedence over the -add option.
  1176.    
  1177.   -SORT
  1178.   
  1179.    
  1180.    
  1181.    Perform chronological date sorting. This is the default.
  1182.    
  1183.   -SUBSORT
  1184.   
  1185.    
  1186.    
  1187.    Sort messages by subject. Subject sorting is case-insensitive, and
  1188.    begining "Re:", "A", "An", and "The" words are ignored.
  1189.    
  1190.   -TIDXFNAME NAME
  1191.   
  1192.    
  1193.    
  1194.    Sets the name of the thread index file to name. The default is
  1195.    "threads.html".
  1196.    
  1197.   -TIME
  1198.   
  1199.    
  1200.    
  1201.    Print out total CPU execution time taken when processing messages.
  1202.    Time information is written to standard error.
  1203.    
  1204.   -TITLE STRING
  1205.   
  1206.    
  1207.    
  1208.    Set the title of the main index page to string. The default is "Mail
  1209.    Index".
  1210.    
  1211.   -THREAD
  1212.   
  1213.    
  1214.    
  1215.    Create a thread index page. This is the default.
  1216.    
  1217.   -TLEVELS
  1218.   
  1219.    
  1220.    
  1221.    Set the maximum number of nested lists for the thread index page. The
  1222.    default is 3.
  1223.    
  1224.   -TREVERSE
  1225.   
  1226.    
  1227.    
  1228.    List threads in the thread index with newest thread first.
  1229.    
  1230.   -TSUBSORT
  1231.   
  1232.    
  1233.    
  1234.    List threads in the thread index by subject.
  1235.    
  1236.   -TTITLE STRING
  1237.   
  1238.    
  1239.    
  1240.    Set the title of the thread index page to string. The default is "Mail
  1241.    Thread Index".
  1242.    
  1243.   -UMASK UMASK
  1244.   
  1245.    
  1246.    
  1247.    Set the umask of the MHonArc process to umask. The value is treated as
  1248.    an octal number.
  1249.    
  1250.   NOTE
  1251.   
  1252.    
  1253.    
  1254.    The -no* options always take precedence over their counterparts. For
  1255.    example, if -noreverse and -reverse are both specified on the
  1256.    command-line, the -noreverse will be applied.
  1257.      _________________________________________________________________
  1258.    
  1259. Environment 
  1260.  
  1261.    
  1262.    
  1263.    MHonArc supports the use of environment variables. The environment
  1264.    variables allow you to set default options everytime you invoke
  1265.    MHonArc. The following environment variables may be used:
  1266.    
  1267.   M2H_DBFILE
  1268.   
  1269.    
  1270.    
  1271.    Sets the name of MHonArc database file. The default is ".mhonarc.db"
  1272.    (or "MHONARC.DB" under MS-DOS).
  1273.    
  1274.    NOTE
  1275.           
  1276.           
  1277.           You should not override the default name unless absolutely
  1278.           necessary, and you are confident about what you are doing.
  1279.           
  1280.   M2H_DOCURL
  1281.   
  1282.    
  1283.    
  1284.    Set the URL used to point to MHonArc documentation. The default is,
  1285.    "http://www.oac.uci.edu/indiv/ehood/mhonarc.html".
  1286.    
  1287.   M2H_FOOTER
  1288.   
  1289.    
  1290.    
  1291.    Set the HTML footer file to insert at the bottom of the index page. No
  1292.    default footer file is defined. See Include Files in Index Page
  1293.    Customization for more information about the footer file.
  1294.    
  1295.   M2H_HEADER
  1296.   
  1297.    
  1298.    
  1299.    Set the HTML header file to insert at the top of the index page. No
  1300.    default header file is defined. See Include Files in Index Page
  1301.    Customization for more information about the header file.
  1302.    
  1303.   M2H_IDXFNAME
  1304.   
  1305.    
  1306.    
  1307.    Set the name of the index file. The default is, "maillist.html".
  1308.    
  1309.   M2H_IDXSIZE
  1310.   
  1311.    
  1312.    
  1313.    Sets the maximum number of messages listed in the indexes.
  1314.    
  1315.   M2H_LOCKFILE
  1316.   
  1317.    
  1318.    
  1319.    The sleep time, in seconds, between attempts to lock the archive. The
  1320.    default value is 3.
  1321.    
  1322.   M2H_LOCKFILE
  1323.   
  1324.    
  1325.    
  1326.    Set the name of the lock file. The default name use is ".mhonarc.lck"
  1327.    (or "MHONARC.LCK" under MS-DOS).
  1328.    
  1329.    NOTE
  1330.           
  1331.           
  1332.           You should not change the default unless absolutely necessary.
  1333.           
  1334.    
  1335.    
  1336.    See Archive Integrity for more information about the lock file.
  1337.    
  1338.   M2H_LOCKTRIES
  1339.   
  1340.    
  1341.    
  1342.    Set the number of time MHonArc tries to lock a mail archive before
  1343.    processing new messages. The default value is 10. MHonArc waits
  1344.    approximately 3 seconds before each try.
  1345.    
  1346.    See Archive Integrity for more information on the M2H_LOCKTRIES
  1347.    environment variable.
  1348.    
  1349.   M2H_MAILTOURL
  1350.   
  1351.    
  1352.    
  1353.    Sets the URL for e-mail address hyperlinks in mail message headers.
  1354.    The URL can contain the following variables that get expanded during
  1355.    run-time:
  1356.    
  1357.    $FROM$
  1358.           
  1359.           
  1360.           Who the message is from.
  1361.           
  1362.    $MSGID$
  1363.           
  1364.           
  1365.           Message ID of the message.
  1366.           
  1367.    $SUBJECT$
  1368.           
  1369.           
  1370.           The subject of the message.
  1371.           
  1372.    $TO$
  1373.           
  1374.           
  1375.           Destination e-mail address of link.
  1376.           
  1377.    
  1378.    
  1379.    The default URL is "mailto:$TO$"
  1380.    
  1381.   M2H_MAXSIZE
  1382.   
  1383.    
  1384.    
  1385.    Sets the maximum number of messages that an archive will contain. If
  1386.    messages are added to the archive which would cause the total number
  1387.    of messages to exceed M2H_MAXSIZE, older messages (based on sort
  1388.    method) are removed automatically.
  1389.    
  1390.   M2H_OUTDIR
  1391.   
  1392.    
  1393.    
  1394.    Sets the destination/location of the HTML mail archive. The default is
  1395.    the current working directory.
  1396.    
  1397.   M2H_RCFILE
  1398.   
  1399.    
  1400.    
  1401.    Specifies the Resource File for MHonArc. No default resource file is
  1402.    defined.
  1403.    
  1404.   M2H_THREAD
  1405.   
  1406.    
  1407.    
  1408.    Flag to determine if MHonArc generates a thread index. If set to zero,
  1409.    the thread index will not be created. The default behavior is to
  1410.    create a thread index.
  1411.    
  1412.   M2H_TIDXFNAME
  1413.   
  1414.    
  1415.    
  1416.    Sets the name of the thread index file. The default is "threads.html".
  1417.    
  1418.   M2H_TITLE
  1419.   
  1420.    
  1421.    
  1422.    Sets the default title of the index page. The default is "Main Index".
  1423.    
  1424.   M2H_TLEVELS
  1425.   
  1426.    
  1427.    
  1428.    Sets the maximum number of nested lists for the thread index page. The
  1429.    default is 3.
  1430.    
  1431.   M2H_TTITLE
  1432.   
  1433.    
  1434.    
  1435.    Sets the title of the thread index page. The default is "Mail Thread
  1436.    Index".
  1437.    
  1438.   NOTE
  1439.   
  1440.    
  1441.    
  1442.    Environment variables may be overriden by the Resource File or
  1443.    command-line Options.
  1444.      _________________________________________________________________
  1445.    
  1446.  
  1447.      _________________________________________________________________
  1448.    
  1449.                                 RESOURCE FILE
  1450.                                        
  1451.    
  1452.    
  1453.    MHonArc supports the ability to read in a resource file to control the
  1454.    behavior of MHonArc. The resource file allows you to specify most of
  1455.    the resources set by environment variables and command-line options,
  1456.    and it allows you to specify other resources to control MHonArc's
  1457.    behavior.
  1458.    
  1459.    The resource file is specified by the M2H_RCFILE environment variable
  1460.    or the -rcfile command-line option. The command-line option overrides
  1461.    the environment variable if both are defined.
  1462.    
  1463.    NOTE
  1464.           
  1465.           
  1466.           MHonArc will store the information specified in the resource
  1467.           file in the database for the archive. Therefore, it is
  1468.           unnecessary to respecify the resource file duing archive
  1469.           updates unless changes are required from the current settings.
  1470.           
  1471.    
  1472.      _________________________________________________________________
  1473.    
  1474. Resource Syntax 
  1475.  
  1476.    
  1477.    
  1478.    Resources are set in the file by using elements similiar in style to
  1479.    HTML/SGML markup. However, MHonArc uses simpler parsing rules for the
  1480.    resource file than standard SGML:
  1481.      *
  1482.        
  1483.        Any line that is not a recognized element open tag, and the line
  1484.        is not contained within an element, is ignored. This implies that
  1485.        regular text can be put anywhere outside of recognized elements
  1486.        for commenting purposes.
  1487.        
  1488.        NOTE: You should use SGML comment declarations (<!-- ... -->) when
  1489.        commenting a resource file. This will eliminate possible conflict
  1490.        with later versions of MHonArc if more stricter parsing rules are
  1491.        adopted.
  1492.      *
  1493.        
  1494.        The opening tag of an element must occur by itself on a single
  1495.        line. Whitespace is allowed before the the open tag.
  1496.      *
  1497.        
  1498.        No comments are allowed inside elements because the text will be
  1499.        treated as element content.
  1500.      *
  1501.        
  1502.        Each element must be closed with a </element_name> tag on its own
  1503.        line unless explicitly stated otherwise in the Resource Elements
  1504.        section. Whitespace is allowed before the close tag.
  1505.      *
  1506.        
  1507.        Some elements can take an optional attribute called "Override".
  1508.        This tells MHonArc that the contents of the element will
  1509.        completely override the default behavior of MHonArc, and previous
  1510.        instances of the element. Example: "<EXCS Override>". If
  1511.        "Override" is not specified, then the contents of the element
  1512.        augment the current setting.
  1513.      *
  1514.        
  1515.        Element names are case-insensitive.
  1516.      *
  1517.        
  1518.        Elements can occur in any order in the resource file.
  1519.        
  1520.   RESOURCE VARIABLES
  1521.   
  1522.    
  1523.    
  1524.    Some resource element contents may contain variables. Variables get
  1525.    expanded to strings at run-time.
  1526.    
  1527.    NOTE
  1528.           
  1529.           
  1530.           Variable expansion will only take place in resource elements
  1531.           that are intended to have variables as part of their content.
  1532.           If an element is not meant to have variables, the variable text
  1533.           will be taken literally as part of the element content.
  1534.           
  1535.    
  1536.    
  1537.    The syntax of the variables to use in resource elements is as follows:
  1538.    
  1539.    
  1540.    $VARIABLE[:[N][U]]$
  1541.    
  1542.    The items in []'s are optional. Definition of each part:
  1543.    
  1544.    $
  1545.           
  1546.           
  1547.           The $ character represents the beginning, and ending, of the
  1548.           variable.
  1549.           
  1550.    VARIABLE
  1551.           
  1552.           
  1553.           This is the the actual name of the variable. All variable names
  1554.           must be uppercase.
  1555.           
  1556.    :[N][U] (optional)
  1557.           
  1558.           
  1559.           This defines a maximum length of the replacement string for the
  1560.           variable. The option "U" denotes that the replacement string
  1561.           should be treated as part of a URL string. This can be useful
  1562.           when the variable may contain special characters, and the
  1563.           variable is used withing a URL.
  1564.           
  1565.    
  1566.    
  1567.    No whitespace is allowed between the opening $ and closing $. If an
  1568.    unrecognized variable is encountered, it gets replaced with an empty
  1569.    string. If a literal "$" is needed, use "$$".
  1570.    
  1571.    SPECIAL NOTE
  1572.           
  1573.           
  1574.           The MAILTOURL resource has different rules for variable
  1575.           expansion. If a variable does not exactly match the set of
  1576.           variables available for the MAILTOURL, the variable text will
  1577.           be taken literally as part of the element content. Therefore, a
  1578.           single "$" can be used to represent a "$" character.
  1579.           
  1580.           Also, variables in the MAILTOURL should NOT have ":NU"
  1581.           modifier. This will prevent the variables from be recognized.
  1582.           MHonArc will automatically treat the replacement value as a
  1583.           part of a URL string.
  1584.           
  1585.    
  1586.    
  1587.    Here are some examples of legal variable usage:
  1588.      * $SUBJECT$
  1589.      * $FROMNAME$
  1590.      * $SUBJECT:50$
  1591.      * $SUBJECTNA:60U$
  1592.      * $FROMADDR:U$
  1593.        
  1594.    
  1595.    
  1596.    Each resource element will define what variables are defined for it.
  1597.      _________________________________________________________________
  1598.    
  1599. Resource Elements
  1600.  
  1601.    
  1602.    
  1603.    The following are complete listings of all the resource elements
  1604.    defined by MHonArc. Many element descriptions will reference to other
  1605.    sections of the documentation on the exact usage of the element.
  1606.    
  1607.   EMPTY ELEMENTS
  1608.   
  1609.    
  1610.    
  1611.    The following list of elements contain no textual content. Therefore,
  1612.    no end tag is required:
  1613.    
  1614.     NODOC
  1615.     
  1616.    
  1617.    
  1618.    Do not put link to documentation on main index page.
  1619.    
  1620.     NOMAILTO
  1621.     
  1622.    
  1623.    
  1624.    Do not convert e-mail addresses in mail headers to mailto hyperlinks.
  1625.    
  1626.     NONEWS
  1627.     
  1628.    
  1629.    
  1630.    Do not convert newsgroups in the Newsgroups: mail header field to news
  1631.    hyperlinks.
  1632.    
  1633.     NOREVERSE
  1634.     
  1635.    
  1636.    
  1637.    Do not perform a reverse listing of the mail messages in the main
  1638.    index page.
  1639.    
  1640.     NOSORT
  1641.     
  1642.    
  1643.    
  1644.    List messages in the index page in the order they are processed.
  1645.    
  1646.     NOTHREAD
  1647.     
  1648.    
  1649.    
  1650.    Do not create thread index.
  1651.    
  1652.     NOTREVERSE
  1653.     
  1654.    
  1655.    
  1656.    List threads in the thread index with oldest thread first.
  1657.    
  1658.     NOTSUBSORT
  1659.     
  1660.    
  1661.    
  1662.    Do not sort thread by subject in thread index page.
  1663.    
  1664.     REVERSE
  1665.     
  1666.    
  1667.    
  1668.    List messages in reverse listing order for the main index page.
  1669.    
  1670.     SORT
  1671.     
  1672.    
  1673.    
  1674.    List messages in the index page in chronological order.
  1675.    
  1676.     SUBSORT
  1677.     
  1678.    
  1679.    
  1680.    Sort messages by subject. Subject sorting is case-insensitive, and
  1681.    begining "Re:", "A", "An", and "The" words are ignored.
  1682.    
  1683.     THREAD
  1684.     
  1685.    
  1686.    
  1687.    Create thread index. This is the default.
  1688.    
  1689.     TREVERSE
  1690.     
  1691.    
  1692.    
  1693.    List threads in the thread index with newest thread first.
  1694.    
  1695.     TSUBSORT
  1696.     
  1697.    
  1698.    
  1699.    Sort thread by subject in thread index page.
  1700.    
  1701.   NON-EMPTY ELEMENTS
  1702.   
  1703.    
  1704.    
  1705.    The following list of elements contain textual content, therefore,
  1706.    each element must be explicitly closed with an element end tag
  1707.    (examples are given in Example Resource File):
  1708.    
  1709.     BOTLINKS
  1710.     
  1711.    
  1712.    
  1713.    Markup for defining the various hyperlinks at the bottom of converted
  1714.    messages. See Navigational Links of Message Customization for usage of
  1715.    this element.
  1716.    
  1717.     DBFILE
  1718.     
  1719.    
  1720.    
  1721.    Use name for the name of MHonArc database file. The default is
  1722.    ".mhonarc.db" (or "MHONARC.DB" under MS-DOS).
  1723.    
  1724.    NOTE
  1725.           
  1726.           
  1727.           You should not override the default name unless absolutely
  1728.           necessary, and you are confident about what you are doing.
  1729.           
  1730.     DOCURL
  1731.     
  1732.    
  1733.    
  1734.    URL to MHonArc documentation. The default is
  1735.    "http://www.oac.uci.edu/indiv/ehood/mhonarc.html".
  1736.    
  1737.     EXCS
  1738.     
  1739.    
  1740.    
  1741.    Set of message header fields to exclude from messages. See Excluding
  1742.    Fields of Message Customization for usage of this element.
  1743.    
  1744.     FIELDORDER
  1745.     
  1746.    
  1747.    
  1748.    The order the message header fields appear in messages. See Field
  1749.    Order of Message Customization for usage of this element.
  1750.    
  1751.     FIELDSTYLES
  1752.     
  1753.    
  1754.    
  1755.    The format specification for message header field values. See Field
  1756.    Formatting of Message Customization for usage of this element.
  1757.    
  1758.     FOOTER
  1759.     
  1760.    
  1761.    
  1762.    File to include at the end of the index page. See Include Files in
  1763.    Index Page Customization for more information about the footer file.
  1764.    
  1765.     HEADER
  1766.     
  1767.    
  1768.    
  1769.    File to include at the beginning of the index page. See Include Files
  1770.    in Index Page Customization for more information about the header
  1771.    file.
  1772.    
  1773.     ICONS
  1774.     
  1775.    
  1776.    
  1777.    The ICONS element is used to specify the icons that represent the
  1778.    different content-types of messages. See Icons in Index Page
  1779.    Customization for usage of this element.
  1780.    
  1781.     IDXFNAME
  1782.     
  1783.    
  1784.    
  1785.    The name of the index file. The default is "maillist.html".
  1786.    
  1787.     LABELSTYLES
  1788.     
  1789.    
  1790.    
  1791.    The format specification for message header field labels. See Field
  1792.    Formatting in Message Customization for usage of this element.
  1793.    
  1794.     LISTBEGIN
  1795.     
  1796.    
  1797.    
  1798.    Markup for beginning the main index list. See Listing Layout in Index
  1799.    Page Customization for usage of this element.
  1800.    
  1801.     LITEMPLATE
  1802.     
  1803.    
  1804.    
  1805.    Markup for an entry in the main index list. See Listing Layout in
  1806.    Index Page Customization for usage of this element.
  1807.    
  1808.     LISTEND
  1809.     
  1810.    
  1811.    
  1812.    Markup for terminating the main index list. See Listing Layout in
  1813.    Index Page Customization for usage of this element.
  1814.    
  1815.     MAILTOURL
  1816.     
  1817.    
  1818.    
  1819.    Url to use for e-mail hyperlinks. See E-mail Links in Message
  1820.    Customization for usage of this element.
  1821.    
  1822.     MIMEARGS
  1823.     
  1824.    
  1825.    
  1826.    Arguments to MIME filters. See Specifying Filters in MIME for usage of
  1827.    this element.
  1828.    
  1829.     MIMEFILTERS
  1830.     
  1831.    
  1832.    
  1833.    Routines for filtering messages. See Specifying Filters in MIME for
  1834.    usage of this element.
  1835.    
  1836.     MSGFOOT
  1837.     
  1838.    
  1839.    
  1840.    Footer text for converted messages. See Header and Footer in Message
  1841.    Customization for usage of this element.
  1842.    
  1843.     MSGHEAD
  1844.     
  1845.    
  1846.    
  1847.    Header text for converted messages. See Header and Footer in Message
  1848.    Customization for usage of this element.
  1849.    
  1850.     MSGSEP
  1851.     
  1852.    
  1853.    
  1854.    Perl regular expression that represents the message separator for
  1855.    mailbox files. The default expression is "^From ".
  1856.    
  1857.     OTHERINDEXES
  1858.     
  1859.    
  1860.    
  1861.    List of resource files (one per line) defining other index pages to
  1862.    generate when creating, or updating, an archive.
  1863.    
  1864.    CAUTION
  1865.           
  1866.           
  1867.           It is very important that each resource file specified defines
  1868.           the IDXFNAME (or the TIDXFNAME and THREAD elements for a thread
  1869.           index) to prevent overwriting of the default index pages.
  1870.           
  1871.    
  1872.    
  1873.    MHonArc will only store the name of the resource files listed in the
  1874.    database. Therefore, for any subsequent updates the archive, the extra
  1875.    index resource files must exist inorder to generate the extra index
  1876.    pages.
  1877.    
  1878.    NOTE
  1879.           
  1880.           
  1881.           Since MHonArc will look in the archive location for resource
  1882.           files specified with relative pathnames, you can keep the other
  1883.           index resource files in the same location as the archive, and
  1884.           just specify the filenames for the OTHERINDEXES element in the
  1885.           main resource file.
  1886.           
  1887.    
  1888.    
  1889.    When create resource files for extra indexes, make sure to explicitly
  1890.    set all resources desired since some resource settings may no longer
  1891.    be set to the defaults due to database settings, or from a previously
  1892.    read resource file. Ie. MHonArc does not reset to the default settings
  1893.    when reading in the other resource files.
  1894.    
  1895.     PERLINC
  1896.     
  1897.    
  1898.    
  1899.    Each line represents a path to search when requiring MIME filters. See
  1900.    Specifying Filters in MIME for the use of this element.
  1901.    
  1902.     TFOOT
  1903.     
  1904.    
  1905.    
  1906.    Markup that appears after the thread index listing. See Listing Layout
  1907.    in Thread Index Customization for usage of this element.
  1908.    
  1909.     THEAD
  1910.     
  1911.    
  1912.    
  1913.    Markup that appears before the thread index listing. See Listing
  1914.    Layout in Thread Index Customization for usage of this element.
  1915.    
  1916.     TIDXFNAME
  1917.     
  1918.    
  1919.    
  1920.    The name of the thread index file. The default is "threads.html".
  1921.    
  1922.     TIMEZONES
  1923.     
  1924.    
  1925.    
  1926.    Each line of the TIMEZONES element defines a timezone acronym and its
  1927.    hour offset from UTC/GMT (Universal Coordinate Time). The format of
  1928.    each line is "timezone_acronym:hour_offset". Examples of timezone
  1929.    acronyms are: UTC, PDT, EST. The hour offset is should be positive for
  1930.    timezones West of UTC, and negative for time zones East of UTC.
  1931.    
  1932.    MHonArc has a default list of timezone acronyms defined with hour
  1933.    offsets. Therefore, the list given in the resource file will augment
  1934.    the default list, unless the "Override" attribute is specified. If
  1935.    "Override" is specified, the default list, along with any other lists
  1936.    specified in previous TIMEZONES elements, are discarded, and only the
  1937.    timezone acronyms specified in the TIMEZONES element will be used.
  1938.    
  1939.    The following is the default value for TIMEZONES:
  1940. <TIMEZONES>
  1941. UTC:0
  1942. GMT:0
  1943. AST:4
  1944. ADT:3
  1945. EST:5
  1946. EDT:4
  1947. CST:6
  1948. CDT:5
  1949. MST:7
  1950. MDT:6
  1951. PST:8
  1952. PDT:7
  1953. </TIMEZONES>
  1954.  
  1955.    
  1956.    
  1957.    Most of the time, the date used by MHonArc uses a hour offset instead
  1958.    of a timezone acronym. However, mail messages may contain timezone
  1959.    acronyms in received/sent dates and MHonArc must be told what the hour
  1960.    offset from UTC the timezone acronym represents in order to properly
  1961.    sort messages by date.
  1962.    
  1963.     TITLE
  1964.     
  1965.    
  1966.    
  1967.    Title for the main index page. The default is "Mail Index".
  1968.    
  1969.     TLEVELS
  1970.     
  1971.    
  1972.    
  1973.    The maximum number of nested lists for the thread index. The default
  1974.    is 3.
  1975.    
  1976.     TLITXT
  1977.     
  1978.    
  1979.    
  1980.    Markup for an entry in the thread index list. See Listing Layout in
  1981.    Thread Index Customization for usage of this element.
  1982.    
  1983.     TOPLINKS
  1984.     
  1985.    
  1986.    
  1987.    Markup for defining the various hyperlinks at the top of converted
  1988.    messages. See Navigational Links in Message Customization for usage of
  1989.    this element.
  1990.    
  1991.     TTITLE
  1992.     
  1993.    
  1994.    
  1995.    Title for the thread index page. The default is "Mail Thread Index".
  1996.    
  1997.     UMASK
  1998.     
  1999.    
  2000.    
  2001.    Sets the umask for the MHonArc process. The value is treated as an
  2002.    octal number. The resource is only applicable on Unix systems.
  2003.      _________________________________________________________________
  2004.    
  2005. Example Resource File
  2006.  
  2007. <!-- MHonArc resource file
  2008.   -->
  2009. <SORT>
  2010. <TITLE>
  2011. MHonArc test
  2012. </TITLE>
  2013.  
  2014. <TTITLE>
  2015. MHonArc test
  2016. </TTITLE>
  2017.  
  2018. <!--=== Index Page Customizations =========================================-->
  2019.  
  2020. <!-- Have LISTBEGIN contain last updated information
  2021.   -->
  2022. <LISTBEGIN>
  2023. <address>
  2024. Last updated: $LOCALDATE$<br>
  2025. $NUMOFMSG$ messages in chronological order<br>
  2026. </address>
  2027. <ul>
  2028. <li><a href="$TIDXFNAME$">Thread Index</a></li>
  2029. </ul>
  2030. <p>
  2031. Listing format is the following:
  2032. <p>
  2033. <ul><li>
  2034. <strong>Subject</strong>
  2035. (# of follow-ups)
  2036. <em>From</em><br>
  2037. </ul>
  2038. <p>
  2039. <hr>
  2040. <ul>
  2041. </LISTBEGIN>
  2042.  
  2043.  
  2044. <!-- A compact listing template
  2045.   -->
  2046. <LITEMPLATE>
  2047. <li>
  2048. <strong>$SUBJECT:40$</strong>
  2049. ($NUMFOLUP$) <em>$FROMNAME$</em><br>
  2050. </LITEMPLATE>
  2051.  
  2052. <LISTEND>
  2053. </ul>
  2054. <p>
  2055. <hr>
  2056. <strong>
  2057. <a href="http://foo.org/">Home</a>
  2058. </strong>
  2059. <p>
  2060. </LISTEND>
  2061.  
  2062. <!--=== Thread Index Page Customizations ==================================-->
  2063. <THEAD>
  2064. <address>
  2065. Thread index<br>
  2066. Last updated: $LOCALDATE$<br>
  2067. $NUMOFMSG$ messages<br>
  2068. </address>
  2069. <ul>
  2070. <li><a href="$IDXFNAME$">Main Index</a></li>
  2071. </ul>
  2072. <hr>
  2073. </THEAD>
  2074.  
  2075. <!--=== Message Customizations ============================================-->
  2076. <EXCS override>
  2077. apparently
  2078. errors-to
  2079. followup
  2080. forward
  2081. lines
  2082. message-id
  2083. mime-
  2084. nntp-
  2085. originator
  2086. path
  2087. precedence
  2088. received
  2089. replied
  2090. return-path
  2091. status
  2092. via
  2093. x-
  2094. </EXCS>
  2095.  
  2096. <LABELSTYLES>
  2097. -default-
  2098. subject:strong
  2099. from:strong
  2100. to:strong
  2101. </LABELSTYLES>
  2102.  
  2103. <FIELDSTYLES>
  2104. -default-
  2105. subject:strong
  2106. from:strong
  2107. to:strong
  2108. keywords:em
  2109. newsgroups:strong
  2110. </FIELDSTYLES>
  2111.  
  2112. <MSGHEAD>
  2113. <address>
  2114. MHonArc test archive
  2115. </address>
  2116. </MSGHEAD>
  2117.  
  2118. <MSGFOOT>
  2119. <strong>
  2120. <a href="http://foo.org/">Home</a> |
  2121. <a href="$IDXFNAME$">Main Index</a> |
  2122. <a href="$TIDXFNAME$">Thread Index</a>
  2123. </strong>
  2124. </MSGFOOT>
  2125.  
  2126. <!--=== Icons =============================================================-->
  2127. <ICONS>
  2128. application/octet-stream:http://foo.org/icons/binary.xbm
  2129. application/postscript:http://foo.org/icons/postscript.xbm
  2130. audio/basic:http://foo.org/icons/sound.xbm
  2131. image/gif:http://foo.org/icons/image.xbm
  2132. image/jpeg:http://foo.org/icons/image.xbm
  2133. image/tiff:http://foo.org/icons/image.xbm
  2134. multipart/alternative:http://foo.org/icons/alternative.xbm
  2135. multipart/digest:http://foo.org/icons/text.xbm
  2136. multipart/mixed:http://foo.org/icons/mixed.xbm
  2137. multipart/parallel:http://foo.org/icons/mixed.xbm
  2138. text/richtext:http://foo.org/icons/mixed.xbm
  2139. text/html:http://foo.org/icons/mixed.xbm
  2140. text/plain:http://foo.org/icons/text.xbm
  2141. unknown:http://foo.org/icons/unknown.doc.xbm
  2142. video/mpeg:http://foo.org/icons/movie.xbm
  2143. video/quicktime:http://foo.org/icons/movie.xbm
  2144. </ICONS>
  2145.  
  2146.    
  2147.      _________________________________________________________________
  2148.    
  2149. Notes on Resource File 
  2150.  
  2151.      *
  2152.        
  2153.        Elements can be duplicated. The following elements augment
  2154.        previous instances of themselves:
  2155.           + EXCS (can specify Override attribute)
  2156.           + FIELDSTYLES
  2157.           + ICONS (can specify Override attribute)
  2158.           + LABELSTYLES
  2159.           + MIMEFILTERS (can specify Override attribute)
  2160.           + PERLINC (can specify Override attribute)
  2161.           +
  2162.             
  2163.             TIMEZONES (can specify Override attribute)
  2164.    
  2165.        
  2166.        The Override attribute will discard previous settings of the
  2167.        element.
  2168.      *
  2169.        
  2170.        If duplicate instances of other elements exist, the last instance
  2171.        takes precedence.
  2172.      *
  2173.        
  2174.        If an element only accepts a single line of content, then the last
  2175.        line is used for the element's content.
  2176.      *
  2177.        
  2178.        If elements have conflicting resource settings (eg. NOSORT and
  2179.        SORT), the last element defined takes precedence.
  2180.      *
  2181.        
  2182.        Resource file settings override environment variables.
  2183.      *
  2184.        
  2185.        Command-line options override any settings in the resource file.
  2186.      *
  2187.        
  2188.        If you want to do an exact match of a field in the EXCS element,
  2189.        append a '$' after the field name.
  2190.        
  2191.    
  2192.      _________________________________________________________________
  2193.    
  2194.  
  2195.      _________________________________________________________________
  2196.    
  2197.                                ADDING MESSAGES
  2198.                                        
  2199.    
  2200.    
  2201.    Adding messages to an archive is done via the -add option. If no
  2202.    mailbox/folder arguments are given, MHonArc assumes that a single
  2203.    message is being added to the archive via standard input. Otherwise,
  2204.    MHonArc adds the messages contained in the mail folders specified.
  2205.    
  2206.    NOTE
  2207.           
  2208.           
  2209.           MHonArc will skip any messages that already exist in an
  2210.           archive. If a message to be added has a message-ID that equals
  2211.           a message-ID of an archived message, the message is skipped.
  2212.           
  2213.    
  2214.      _________________________________________________________________
  2215.    
  2216. Examples 
  2217.  
  2218.   ADDING A MAIL FOLDER
  2219.   
  2220.    
  2221.    
  2222.    Here is example session adding an mail folder to an existing archive:
  2223. % mhonarc -add test/www
  2224. Requiring MIME filter libraries ...
  2225.         mhexternal.pl
  2226.         mhtxthtml.pl
  2227.         mhtxtplain.pl
  2228.         mhtxtsetext.pl
  2229. Adding messages to ./maillist.html
  2230. Reading test/www/ ........................................
  2231. Writing HTML ...
  2232. 49 messages
  2233.  
  2234.   .FORWARD
  2235.   
  2236.    
  2237.    
  2238.    MHonArc can be used to add new messages as they are received by using
  2239.    the ".forward" file in your home directory. Here is how I would set up
  2240.    my .forward file to invoke MHonArc on incoming mail:
  2241. \ehood, "|/mnt/ehood/bin/webnewmail #ehood"
  2242.  
  2243.    NOTE on .forward entry:
  2244.           
  2245.           
  2246.           The "\ehood" tells sendmail to still deposit the incoming
  2247.           message to my mail spool file. The "#ehood" Bourne shell
  2248.           comment is needed to insure the command is unique from another
  2249.           user. Otherwise, sendmail may not invoke the program for you or
  2250.           the other user.
  2251.           
  2252.    
  2253.    
  2254.    "webnewmail" is a Perl program that calls MHonArc with the appropriate
  2255.    arguments. A wrapper program is used instead of calling MHonArc
  2256.    directly to keep the .forward file simple. Here is the code to the
  2257.    webnewmail program:
  2258. #!/usr/local/bin/perl
  2259.  
  2260. $cmd = "/mnt/ehood/bin/mhonarc -add -quiet " .
  2261.  "-outdir /mnt/ehood/public_html/newmail";
  2262. open(M2H, "|$cmd");
  2263. print M2H <STDIN>;
  2264. close(M2H);
  2265.  
  2266.    
  2267.    
  2268.    The webnewmail can be modified to check the mail header before calling
  2269.    MHonArc to perform selective archiving of messages. For example,
  2270.    webnewmail can check the To: field and only archive messages that come
  2271.    from a specific mailing list.
  2272.    
  2273.   CRON
  2274.   
  2275.    
  2276.    
  2277.    This example uses cron(1) to update some mail archives from MH mail
  2278.    folders.
  2279.    
  2280.    The following entry is in my crontab file:
  2281. 0 0 * * * webmail
  2282.  
  2283.    
  2284.    
  2285.    webmail is a script executed every night that calls MHonArc to perform
  2286.    the update:
  2287. #! /bin/csh -f
  2288.  
  2289. umask 022
  2290. setenv M2H_RCFILE $HOME/.mhonarc.rc
  2291. ## WWW messages
  2292. mhonarc -add \
  2293.           -outdir $HOME/public_html/doc/wwwmail \
  2294.           $HOME/mail/www
  2295. folder +www >& /dev/null
  2296. refile first-last +www.ar >& /dev/null    # Archive original messages
  2297.  
  2298. ## Tools messages
  2299. mhonarc -add \
  2300.           -outdir $HOME/public_html/doc/toolsmail \
  2301.           $HOME/mail/tools $HOME/mail/dtd
  2302. folder +tools >& /dev/null
  2303. refile first-last +tools.ar >& /dev/null  # Archive original messages
  2304. folder +dtd >& /dev/null
  2305. refile first-last +dtd.ar >& /dev/null    # Archive original messages
  2306.  
  2307. folder +inbox >& /dev/null                # Set current folder to inbox
  2308.  
  2309.  
  2310.    
  2311.    
  2312.    To avoid mail everynight from cron due to output from MHonArc, the
  2313.    -quiet option can be used for each call to MHonArc, or use the
  2314.    following line in your crontab file:
  2315. 0 0 * * * webmail > /dev/null
  2316.  
  2317.    
  2318.    
  2319.    Standard error is not redirected to /dev/null so mail is still
  2320.    received if errors occured during MHonArc execution.
  2321.      _________________________________________________________________
  2322.    
  2323.  
  2324.      _________________________________________________________________
  2325.    
  2326.                               REMOVING MESSAGES
  2327.                                        
  2328.    
  2329.    
  2330.    Removing messages from an archive is done via the -rmm option.
  2331.    Messages to be deleted are designated by message numbers on the
  2332.    command-line.
  2333.    
  2334.    Example
  2335. % mhonarc -rmm 24 28 39 48
  2336. Removing messages from ./maillist.html ...
  2337.         Removing message 24
  2338.         Removing message 28
  2339.         Removing message 39
  2340.         Removing message 48
  2341.  
  2342. Writing mail ...
  2343. Writing tmp/maillist.html ...
  2344. Writing tmp/threads.html ...
  2345. 45 messages
  2346.  
  2347.    
  2348.      _________________________________________________________________
  2349.    
  2350. Message Numbers 
  2351.  
  2352.    
  2353.    
  2354.    Normally, you will never have to worry about message numbers unless
  2355.    you want to remove messages from an archive. Therefore, you will need
  2356.    to know how MHonArc assigns message numbers when processing messages.
  2357.    
  2358.    When a message is processed, the smallest available number is assigned
  2359.    to it, starting with 0. The number assigned to a message becomes part
  2360.    of the filename for the HTML version of the message (eg.
  2361.    msg00042.html).
  2362.    
  2363.    To avoid message number conflicts, MHonArc determines the smallest
  2364.    available number by finding the largest assigned number and adding one
  2365.    to it.
  2366.      _________________________________________________________________
  2367.    
  2368. Scanning an Archive 
  2369.  
  2370.    
  2371.    
  2372.    You will quickly find out that finding the message numbers for a
  2373.    messages you want to remove can be a cumbersome task if all you have
  2374.    to work with are the message filenames. To ease this task, MHonArc
  2375.    gives you the ability to scan an archives contents via the -scan
  2376.    command-line option.
  2377.    
  2378.   EXAMPLE
  2379. % mhonarc -scan
  2380. 100 messages in .:
  2381.  
  2382. Msg #  YY/MM/DD  From             Subject
  2383. -----  --------  ---------------  ---------------------------------------------
  2384.   513  95/02/09  Rick Silterra    EDComment(sic)
  2385.   517  95/02/09  Earl Hood        Re: DTD2HTML
  2386.   512  95/02/09  Earl Hood        Re: edc2html
  2387.   516  95/02/09  John Barnum      Re: DTD2HTML
  2388.   515  95/02/09  Earl Hood        Re: DTD2HTML
  2389.   511  95/02/09  Rick Silterra    edc2html
  2390.   514  95/02/08  John Barnum      DTD2HTML
  2391.   510  95/02/06  jflores          mhonarc_diagnostics.doc.html
  2392.   509  95/02/06  web              Dr.Web: Status Review + Thank You
  2393.   508  95/02/05  Earl Hood        Re: sgml to html converters
  2394.   507  95/02/03  Aileen Barry     sgml to html converters
  2395.   506  95/01/28  Earl Hood        Re: MHonarc: Deleting Messages from an archiv
  2396.   505  95/01/28  Floyd Moore      MHonarc: Deleting Messages from an archive
  2397.   504  95/01/25  Earl Hood        Re: MHonArc
  2398.   503  95/01/25  Earl Hood        Re: MHonArc
  2399. ...
  2400.  
  2401.    
  2402.    
  2403.    The messages are listed in the same order as they are listed in the
  2404.    archive's index page. You will notice that the list order does not
  2405.    necessarily correspond with message number order. If you always want
  2406.    the messages listed in message number order when scanning, use the
  2407.    following:
  2408. % mhonarc -scan -nosort -noreverse
  2409. 82 messages in .:
  2410.  
  2411. Msg #  YY/MM/DD  From             Subject
  2412. -----  --------  ---------------  ---------------------------------------------
  2413.     0  94/05/09  Michael O´Sulli  Re: Finger within an html
  2414.  
  2415.     1  94/04/31  John M. Troyer   Re: TROFF to HTML Converters
  2416.     2  94/05/04  John D. Kilburg  ANNOUNCE: Chimera 1.53
  2417.     3  94/05/17  Stephen Billing  Re: government www?
  2418.     4  94/05/21  C. Emory Tate    Re: government www?
  2419.     5  94/05/24  Daniel W. Conno  Re: Comments on HTML 2.0 document/DTD
  2420.     6  94/05/24  Dan Connolly     Re: Validating HTML documents:
  2421.     7  94/05/25  Henrik Frystyk   CERN Common World-Wide Web Library 2.16pre2 A
  2422.     8  94/06/04  Denesh Bhabuta   Re: Atari on www (revisited)
  2423.     9  94/06/07  Dale Newfield    ANNOUNCE: Come explore The Edge - SIGGRAPH 94
  2424.    10  94/06/11  Roy T. Fielding  Announcing libwww-perl 0.12
  2425. ...
  2426.  
  2427.    
  2428.      _________________________________________________________________
  2429.    
  2430.  
  2431.      _________________________________________________________________
  2432.    
  2433.                           INDEX PAGE CUSTOMIZATION
  2434.                                        
  2435.    
  2436.    
  2437.    MHonArc creates an index page with links to all mail messages filtered
  2438.    (unless processing a single message with the -single option). MHonArc
  2439.    allows you to have complete customization over the appearance of the
  2440.    index page by setting various resource either through environment
  2441.    variables, command-line options, or the resource file.
  2442.      _________________________________________________________________
  2443.    
  2444. Filename 
  2445.  
  2446.    
  2447.    
  2448.    By default, the filename of the index page is "maillist.html".
  2449.    However, a different name may be specified with the M2H_IDXFNAME
  2450.    environment variable, the IDXFNAME resource element, or the -idxfname
  2451.    command-line option.
  2452.      _________________________________________________________________
  2453.    
  2454. Beginning Markup
  2455.  
  2456.    
  2457.    
  2458.    MHonArc allows you to completely override the begining markup of the
  2459.    index page. I.e. You can control the opening <HTML> tag, the HEAD
  2460.    element contents, the opening <BODY> tag, etc. Therefore, if you are
  2461.    not satisfied with the default behavior of how the TITLE resource is
  2462.    used, or have other needs that require control on the beginning
  2463.    markup, you can set the IDXPGBEGIN resource file element.
  2464.    
  2465.   IDXPGBEGIN
  2466.   
  2467.    
  2468.    
  2469.    The best way to show how the IDXPGBEGIN works, the following
  2470.    represents the default setting MHonArc uses:
  2471. <IDXPGBEGIN>
  2472. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2473. <HTML>
  2474. <HEAD>
  2475. <TITLE>$IDXTITLE$</TITLE>
  2476. </HEAD>
  2477. <BODY>
  2478. <H1>$IDXTITLE$</H1>
  2479. </IDXPGBEGIN>
  2480.  
  2481.    NOTE
  2482.           
  2483.           
  2484.           Technically, setting the TITLE resource, via the M2H_TITLE
  2485.           environment variable, the TITLE resource element, or the -title
  2486.           command-line option, sets the $IDXTITLE$ resource file
  2487.           variable.
  2488.           
  2489.    
  2490.    
  2491.    The resource variables allowed in the IDXPGBEGIN element are the
  2492.    following:
  2493.      * $DOCURL$ -- URL to documentation
  2494.      * $GMTDATE$ -- Current GMT date.
  2495.      * $IDXFNAME$ -- Filename of main index page.
  2496.      * $IDXSIZE$ -- Max number of messages that may be listed in the
  2497.        index.
  2498.      * $IDXTITLE$ -- The title of the index page.
  2499.      * $LOCALDATE$ -- Current local date.
  2500.      * $NUMOFIDXMSG$ -- Number of message listed.
  2501.      * $NUMOFMSG$ -- Number of messages in the archive.
  2502.      * $OUTDIR$ -- Pathname of archive.
  2503.      * $PROG$ -- Program name.
  2504.      * $TIDXFNAME$ -- Filename of thread index page.
  2505.      * $TIDXTITLE$ -- Title of thread index page.
  2506.      * $VERSION$ -- Program version.
  2507.        
  2508.    
  2509.    
  2510.    See Resource Variables for more information on the usage of variables.
  2511.    
  2512.      _________________________________________________________________
  2513.    
  2514. End Markup 
  2515.  
  2516.    
  2517.    
  2518.    Since MHonArc allows you to control the beginning markup, it makes
  2519.    sense for it to allow you to control the ending markup.
  2520.    
  2521.   IDXPGEND
  2522.   
  2523.    
  2524.    
  2525.    The IDXPGEND resource element may be used to define the ending markup
  2526.    of the index page. The default value is the following:
  2527. <IDXPGEND>
  2528. </BODY>
  2529. </HTML>
  2530. </IDXPGEND>
  2531.  
  2532.    
  2533.    
  2534.    The resource variables allowed are the same as for IDXPGBEGIN.
  2535.      _________________________________________________________________
  2536.    
  2537. Include Files
  2538.  
  2539.    
  2540.    
  2541.    MHonArc allows you to include the contents of files into the index
  2542.    page via the header and footer resources.
  2543.    
  2544.    NOTE
  2545.           
  2546.           
  2547.           The use of include files is discouraged since the LISTBEGIN and
  2548.           LISTEND resources can be used to achieve the same results.
  2549.           Also, the support for the include resource may be removed in
  2550.           future releases.
  2551.           
  2552.    
  2553.    
  2554.    The header file is specified via the M2H_HEADER environment variable,
  2555.    the HEADER resource element, or the -header command-line option. The
  2556.    contents of the header file are inserted above the message listing,
  2557.    and right after the H1 title element.
  2558.    
  2559.    NOTE
  2560.           
  2561.           
  2562.           Filename should not contain the <HTML>, <HEAD>, and <BODY>
  2563.           tags; these tags are automatically provided by MHonArc, or
  2564.           defined by the IDXPGBEGIN resource file element.
  2565.           
  2566.    
  2567.    
  2568.    The footer file is specified via the M2H_FOOTER environment variable,
  2569.    the FOOTER resource element, or the -footer command-line option. The
  2570.    contents of the footer file are inserted after the message listing.
  2571.    
  2572.    NOTE
  2573.           
  2574.           
  2575.           Filename should not contain the </BODY>, and </HTML> tags;
  2576.           these tags are automatically provided by MHonArc, or defined by
  2577.           the IDXPGEND resource file element.
  2578.           
  2579.    
  2580.    
  2581.    The header and footer files allow you to incorporate search-forms,
  2582.    hyperlinks to other pages, or any other HTML markup you like.
  2583.    
  2584.    It is only necessary to specify the header and/or footer files the
  2585.    first time you create an archive. The contents included from the
  2586.    header and/or footer files are preserved in any subsequent additions
  2587.    to the archive. Only respecify the header and/or footer files if you
  2588.    need to make changes to the header/footer contents.
  2589.      _________________________________________________________________
  2590.    
  2591. Listing Layout
  2592.  
  2593.    
  2594.    
  2595.    MHonArc lists messages in the order specified by the various sort
  2596.    options. However, you have complete control on how the message listing
  2597.    are formatted via the LISTBEGIN, LITEMPLATE, and LISTEND resource
  2598.    elements in the Resource File. These elements allow you to specify the
  2599.    HTML markup to use in the index page.
  2600.    
  2601.   LISTBEGIN
  2602.   
  2603.    
  2604.    
  2605.    The LISTBEGIN resource element specifies the text to begin the message
  2606.    list. The text can be any valid HTML markup. Plus, MHonArc defines the
  2607.    following variables you may use which get expanded at run-time:
  2608.      * $DOCURL$ -- URL to documentation
  2609.      * $GMTDATE$ -- Current GMT date.
  2610.      * $IDXFNAME$ -- Filename of main index page.
  2611.      * $IDXSIZE$ -- Max number of messages that may be listed in the
  2612.        index.
  2613.      * $IDXTITLE$ -- The title of the index page.
  2614.      * $LOCALDATE$ -- Current local date.
  2615.      * $NUMOFIDXMSG$ -- Number of message listed.
  2616.      * $NUMOFMSG$ -- Number of messages in the archive.
  2617.      * $OUTDIR$ -- Pathname of archive.
  2618.      * $PROG$ -- Program name.
  2619.      * $TIDXFNAME$ -- Filename of thread index page.
  2620.      * $TIDXTITLE$ -- Title of thread index page.
  2621.      * $VERSION$ -- Program version.
  2622.        
  2623.    
  2624.    
  2625.    MHonArc's LISTBEGIN default value is the following:
  2626. <LISTBEGIN>
  2627. <UL>
  2628. <LI><A HREF="$TIDXFNAME$">Thread Index</A></LI>
  2629. </UL>
  2630. <HR>
  2631. <UL>
  2632. </LISTBEGIN>
  2633.  
  2634.    
  2635.    
  2636.    If the NOTHREAD resource is set, the following is the default value:
  2637. <LISTBEGIN>
  2638. <HR>
  2639. <UL>
  2640. </LISTBEGIN>
  2641.  
  2642.   LITEMPLATE
  2643.   
  2644.    
  2645.    
  2646.    The LITEMPLATE resoure element defines the HTML text to represent each
  2647.    message list item. You may use the following variables which are
  2648.    expanded at runtime:
  2649.      * $A_ATTR$ -- The NAME and HREF attributes to use in an anchor to
  2650.        link to the archived message. The NAME attribute links the
  2651.        messages to the index page.
  2652.      * $A_HREF$ -- The HREF attribute to use in an anchor to link to the
  2653.        archived message.
  2654.      * $A_NAME$ -- The NAME attributes to use in an anchor for messages
  2655.        to link to the index page.
  2656.      * $DATE$ -- The date of the message.
  2657.      * $DDMMYY$ -- Message date in dd/mm/yy format.
  2658.      * $ICON$ -- The context-type sensistive icon. See Icons for
  2659.        information.
  2660.      * $ICONURL$ -- The URL to the context-type sensistive icon. See
  2661.        Icons for information.
  2662.      * $MMDDYY$ -- Message date in mm/dd/yy format.
  2663.      * $NUMFOLUP$ -- Number of follow-ups for the given message.
  2664.      * $FROM$ -- The complete text in the From: field of the message.
  2665.      * $FROMADDR$ -- The e-mail address in the From: field of the
  2666.        message.
  2667.      * $FROMNAME$ -- The English name of the person in the From: field of
  2668.        the message. If no English name is found, the username specified
  2669.        in the e-mail address is used.
  2670.      * $MSGNUM$ -- The message numbers assigned to the message by
  2671.        MHonArc.
  2672.      * $ORDNUM$ -- The current listing number of the message.
  2673.      * $SUBJECT$ -- The subject text of the message wrapped in an anchor
  2674.        element that hyperlinks to the message.
  2675.      * $SUBJECTNA$ -- The subject text of the message without the anchor
  2676.        element.
  2677.      * $YYMMDD$ -- Message date in yy/mm/dd format.
  2678.        
  2679.    
  2680.    
  2681.    NOTE
  2682.           
  2683.           
  2684.           Do not specify $A_ATTR$, $A_NAME, and $SUBJECT$ together in the
  2685.           LITEMPLATE element. Since all of these variables contain the
  2686.           NAME atrribute. Invalid HTML will be created since multiple
  2687.           anchors will have the same NAME identifier.
  2688.           
  2689.    
  2690.    
  2691.    LITEMPLATE's default value is the following:
  2692. <LITEMPLATE>
  2693. <LI><STRONG>$SUBJECT$</STRONG>
  2694. <UL><LI><EM>From</EM>: $FROM$</LI></UL>
  2695. </LI>
  2696. </LITEMPLATE>
  2697.  
  2698.   LISTEND
  2699.   
  2700.    
  2701.    
  2702.    The LISTEND resource element specifies the text to use to end the
  2703.    message list. The text can be any valid HTML markup. LISTEND may
  2704.    contain the same variables as LISTBEGIN.
  2705.    
  2706.    LISTEND's default value is the following:
  2707. <LISTEND>
  2708. </UL>
  2709. </LISTEND>
  2710.  
  2711.    
  2712.      _________________________________________________________________
  2713.    
  2714. Icons
  2715.  
  2716.    
  2717.    
  2718.    MHonArc supports the ability to insert icons in the index page for
  2719.    each message based on the message's content-type. For example: You can
  2720.    have text/plain messages use a different icon than text/html messages.
  2721.    
  2722.   DEFINING ICONS
  2723.   
  2724.    
  2725.    
  2726.    To specify the icons for MHonArc to use, you use the ICONS resource
  2727.    element in the Resource File. The format of each line in the ICONS
  2728.    element is as follows:
  2729.    
  2730.    <content-type>:<URL for icon>
  2731.    
  2732.    <content-type> represents a MIME content-type. <URL for icon> is the
  2733.    URL to the icon. The special content-type called "unknown" may be
  2734.    defined to specify the icon to use for non-recognized content-types.
  2735.    If unknown is not defined, the text/plain icon is used for unknown
  2736.    content types.
  2737.    
  2738.     Example
  2739. <ICONS>
  2740. audio/basic:http://foo.org/gifs/gsound.gif
  2741. image/gif:http://foo.org/gifs/gimage.gif
  2742. image/jpeg:http://foo.org/gifs/gimage.gif
  2743. image/tiff:http://foo.org/gifs/ggraphic.gif
  2744. multipart/alternative:http://foo.org/gifs/gmulti.gif
  2745. multipart/digest:http://foo.org/gifs/gtext.gif
  2746. multipart/mixed:http://foo.org/gifs/gdoc2.gif
  2747. multipart/parallel:http://foo.org/gifs/gdoc.gif
  2748. text/richtext:http://foo.org/gifs/gdoc.gif
  2749. text/html:http://foo.org/gifs/gdoc.gif
  2750. text/plain:http://foo.org/gifs/gletter.gif
  2751. unknown:http://foo.org/gifs/gunknown.gif
  2752. video/mpeg:http://foo.org/gifs/gmovie.gif
  2753. </ICONS>
  2754.  
  2755.   USING ICONS
  2756.   
  2757.    
  2758.    
  2759.    In order to incorporate icons into the index page, insert the $ICON$
  2760.    variable into the LITEMPLATE resource element.
  2761.    
  2762.     Example
  2763. <litemplate>
  2764. $ICONURL$<strong>$SUBJECT:40$</strong>
  2765. ($NUMFOLUP$) <em>$FROMNAME$</em><br>
  2766. </litemplate>
  2767.  
  2768.    
  2769.    
  2770.    The $ICON$ variable expands to the IMG HTML element with the
  2771.    appropriate URL in the SRC attribute to the icon. The ALT attribute of
  2772.    the IMG element contains the content-type of the message, surrounded
  2773.    by []'s, for use with text based browsers.
  2774.    
  2775.    $ICONURL$ may also be used if you want redefine the format of the IMG
  2776.    element.
  2777.    
  2778.     Example
  2779. <litemplate>
  2780. <img src="$ICONURL$" alt="* "><strong>$SUBJECT:40$</strong>
  2781. ($NUMFOLUP$) <em>$FROMNAME$</em><br>
  2782. </litemplate>
  2783.  
  2784.    
  2785.    
  2786.    This example overrides what is normally used in the ALT attribute.
  2787.      _________________________________________________________________
  2788.    
  2789. Examples 
  2790.  
  2791.   EXAMPLE 1
  2792.   
  2793.    
  2794.    
  2795.    It may be easier to see how the LISTBEGIN, LITEMPLATE, LISTEND
  2796.    resource elements work when declared together:
  2797. <!-- This represents the default values used by MHonArc -->
  2798. <LISTBEGIN>
  2799. <UL>
  2800. <LI><A HREF="$TIDXFNAME$">Thread Index</A></LI>
  2801. </UL>
  2802. <HR>
  2803. <UL>
  2804. </LISTBEGIN>
  2805.  
  2806. <LITEMPLATE>
  2807. <LI><STRONG>$SUBJECT$</STRONG>
  2808. <UL><LI><EM>From</EM>: $FROM$</LI></UL>
  2809. </LI>
  2810. </LITEMPLATE>
  2811.  
  2812. <LISTEND>
  2813. </UL>
  2814. </LISTEND>
  2815.  
  2816.   EXAMPLE 2
  2817.   
  2818.    
  2819.    
  2820.    Here's another example that changes the layout into a more compact
  2821.    listing, adds Icons usage, and adds a time stamp information on when
  2822.    the index page was last updated:
  2823. <listbegin>
  2824. <address>
  2825. Last update: $CURDATE$<br>
  2826. $NUMOFMSG$ messages<br>
  2827. </address>
  2828. <p>
  2829. <UL>
  2830. <LI><A HREF="$TIDXFNAME$">Thread Index</A></LI>
  2831. </UL>
  2832. <p>
  2833. Messages listed in chronological order.  Listing format is the following:
  2834. <blockquote>
  2835. <img src="http://foo.org/gifs/gletter.gif" alt="* ">
  2836. <strong>Subject</strong>
  2837. (# of follow-ups)
  2838. <em>From</em>.
  2839. </blockquote>
  2840. <p>
  2841. <hr>
  2842. </listbegin>
  2843.  
  2844. <litemplate>
  2845. <img src="$ICONURL$" alt="* "><strong>$SUBJECT:40$</strong>
  2846. ($NUMFOLUP$) <em>$FROMNAME$</em><br>
  2847. </litemplate>
  2848.  
  2849. <listend>
  2850. </listend>
  2851.  
  2852.    
  2853.      _________________________________________________________________
  2854.    
  2855.  
  2856.      _________________________________________________________________
  2857.    
  2858.                             MESSAGE CUSTOMIZATION
  2859.                                        
  2860.    
  2861.    
  2862.    This sections shows how to customize the appearance of messages when
  2863.    converted to HTML.
  2864.      _________________________________________________________________
  2865.    
  2866. Beginning Markup
  2867.  
  2868.    
  2869.    
  2870.    MHonArc allows you to completely override the begining markup of the
  2871.    message pages. I.e. You can control the opening <HTML> tag, the HEAD
  2872.    element contents, the opening <BODY> tag, etc. Therefore, if you are
  2873.    not satisfied with the default markup used, or have other needs that
  2874.    require control on the beginning markup, you can set the MSGPGBEGIN
  2875.    resource file element.
  2876.    
  2877.   MSGPGBEGIN
  2878.   
  2879.    
  2880.    
  2881.    The MSGPGBEGIN resource file element has the default value:
  2882. <MSGPGBEGIN>
  2883. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2884. <HTML>
  2885. <HEAD>
  2886. <TITLE>$SUBJECTNA:72$</TITLE>
  2887. <LINK REV="made" HREF="mailto:$FROMADDR$">
  2888. </HEAD>
  2889. <BODY>
  2890. </MSGPGBEGIN>
  2891.  
  2892.    
  2893.    
  2894.    The following variables may be used in the MSGPGBEGIN element:
  2895.      * $DATE$ -- Message date.
  2896.      * $DDMMYY$ -- Message date in dd/mm/yy format.
  2897.      * $DOCURL$ -- URL to documentation.
  2898.      * $FROM$ -- Contents of From field of message.
  2899.      * $FROMADDR$ -- E-mail address contained in From field of message.
  2900.      * $FROMNAME$ -- "English" name contained in From field of message.
  2901.      * $GMTDATE$ -- Current GMT date.
  2902.      * $IDXFNAME$ -- Filename of main index page.
  2903.      * $IDXSIZE$ -- Max number of messages that may be listed in the
  2904.        index.
  2905.      * $IDXTITLE$ -- The title of the index page.
  2906.      * $LOCALDATE$ -- Current local date.
  2907.      * $MMDDYY$ -- Message date in mm/dd/yy format.
  2908.      * $MSGID$ -- Message ID of message.
  2909.      * $MSGNUM$ -- Number assigned to message by MHonArc.
  2910.      * $NUMOFIDXMSG$ -- Number of message listed.
  2911.      * $NUMOFMSG$ -- Number of messages in the archive.
  2912.      * $OUTDIR$ -- Pathname of archive.
  2913.      * $PROG$ -- Program name.
  2914.      * $SUBJECTNA$ -- Message subject text.
  2915.      * $TIDXFNAME$ -- Filename of thread index page.
  2916.      * $TIDXTITLE$ -- Title of thread index page.
  2917.      * $VERSION$ -- Program version.
  2918.      * $YYMMDD$ -- Message date in yy/mm/dd format.
  2919.        
  2920.    
  2921.      _________________________________________________________________
  2922.    
  2923. End Markup 
  2924.  
  2925.    
  2926.    
  2927.    The ending markup of messages can be controlled by the MSGPGEND
  2928.    resource file element.
  2929.    
  2930.   MSGPGEND
  2931.   
  2932.    
  2933.    
  2934.    The MSGPGEND resource element may be used to define the ending markup
  2935.    of the message pages. The default value is the following:
  2936. <MSGPGEND>
  2937. </BODY>
  2938. </HTML>
  2939. </MSGPGEND>
  2940.  
  2941.    
  2942.    
  2943.    The resource variables allowed are the same as for MSGPGBEGIN.
  2944.      _________________________________________________________________
  2945.    
  2946. Header and Footer
  2947.  
  2948.    
  2949.    
  2950.    The MSGHEAD resource represents HTML text that should be inserted at
  2951.    the very beginning of each converted message. The MSGFOOT resource
  2952.    represents HTML text that should be appended to the end of each
  2953.    converted message. The default value for both resources is empty. The
  2954.    following variables may be used in the MSGHEAD and MSGFOOT content:
  2955.      * $DATE$ -- Message date.
  2956.      * $DDMMYY$ -- Message date in dd/mm/yy format.
  2957.      * $DOCURL$ -- URL to documentation.
  2958.      * $FROM$ -- Contents of From field of message.
  2959.      * $FROMADDR$ -- E-mail address contained in From field of message.
  2960.      * $FROMNAME$ -- "English" name contained in From field of message.
  2961.      * $GMTDATE$ -- Current GMT date.
  2962.      * $IDXFNAME$ -- Filename of main index page.
  2963.      * $IDXSIZE$ -- Max number of messages that may be listed in the
  2964.        index.
  2965.      * $IDXTITLE$ -- The title of the index page.
  2966.      * $LOCALDATE$ -- Current local date.
  2967.      * $MMDDYY$ -- Message date in mm/dd/yy format.
  2968.      * $MSGID$ -- Message ID of message.
  2969.      * $MSGNUM$ -- Number assigned to message by MHonArc.
  2970.      * $OUTDIR$ -- Pathname of archive.
  2971.      * $PROG$ -- Program name.
  2972.      * $SUBJECTNA$ -- Message subject text.
  2973.      * $TIDXFNAME$ -- Filename of thread index page.
  2974.      * $TIDXTITLE$ -- Title of thread index page.
  2975.      * $VERSION$ -- Program version.
  2976.      * $YYMMDD$ -- Message date in yy/mm/dd format.
  2977.        
  2978.    
  2979.      _________________________________________________________________
  2980.    
  2981. Navigational Links
  2982.  
  2983.    
  2984.    
  2985.    MHonArc gives you the ability to control the layout of the
  2986.    navigational links for each message page. Navigational links include
  2987.    links to previous and next messages, link to main index, link to
  2988.    thread index, etc. The layout of the navigational links are controlled
  2989.    by two resource file elements: TOPLINKS and BOTLINKS.
  2990.    
  2991.   TOPLINKS
  2992.   
  2993.    
  2994.    
  2995.    The TOPLINKS resource element defines the layout of the navigational
  2996.    links at the top of each message page. The markup defined, will appear
  2997.    after the MSGHEAD data and before the filtered message data.
  2998.    
  2999.    The default value for TOPLINKS is the following:
  3000. <TOPLINKS>
  3001. <HR>
  3002. $PREVBUTTON$$NEXTBUTTON$<A HREF="$IDXFNAME$#$MSGNUM$">[Index]</A><A
  3003. HREF="$TIDXFNAME$#$MSGNUM$">[Thread]</A>
  3004. </TOPLINKS>
  3005.  
  3006.    
  3007.    
  3008.    If no thread index is specified, then the thread link markup is
  3009.    removed. The following variables are available:
  3010.      * $DATE$ -- Message date.
  3011.      * $DDMMYY$ -- Message date in dd/mm/yy format.
  3012.      * $DOCURL$ -- URL to documentation.
  3013.      * $FROM$ -- Contents of From field of message.
  3014.      * $FROMADDR$ -- E-mail address contained in From field of message.
  3015.      * $FROMNAME$ -- "English" name contained in From field of message.
  3016.      * $GMTDATE$ -- Current GMT date.
  3017.      * $IDXFNAME$ -- Filename of main index page.
  3018.      * $IDXSIZE$ -- Max number of messages that may be listed in the
  3019.        index.
  3020.      * $IDXTITLE$ -- The title of the index page.
  3021.      * $LOCALDATE$ -- Current local date.
  3022.      * $MMDDYY$ -- Message date in mm/dd/yy format.
  3023.      * $MSGID$ -- Message ID of message.
  3024.      * $MSGNUM$ -- Number assigned to message by MHonArc.
  3025.      * $NEXTBUTTON$ -- Next button markup. See Conditional Links for more
  3026.        information.
  3027.      * $NEXTFROM$ -- Contenst of From field of the next message according
  3028.        to the list order of the main index.
  3029.      * $NEXTFROMADDR$ -- E-mail address contained in From field of the
  3030.        next message according to the list order of the main index.
  3031.      * $NEXTFROMNAME$ -- English" name contained in From field of the
  3032.        next message according to the list order of the main index.
  3033.      * $NEXTLINK$ -- Next link markup. See Conditional Links for more
  3034.        information.
  3035.      * $NEXTMSG$ -- Filename of next message according to the list order
  3036.        of the main index.
  3037.      * $NEXTMSGNUM$ -- Number assigned to next message according to the
  3038.        list order of the main index.
  3039.      * $NEXTSUBJECT$ -- Subject of next message according to the list
  3040.        order of the main index.
  3041.      * $NUMOFIDXMSG$ -- Number of message listed.
  3042.      * $NUMOFMSG$ -- Number of messages in the archive.
  3043.      * $PREVBUTTON$ -- Previous button markup. See Conditional Links for
  3044.        more information.
  3045.      * $PREVFROM$ -- Contenst of From field of the previous message
  3046.        according to the list order of the main index.
  3047.      * $PREVFROMADDR$ -- E-mail address contained in From field of the
  3048.        previous message according to the list order of the main index.
  3049.      * $PREVFROMNAME$ -- English" name contained in From field of the
  3050.        previous message according to the list order of the main index.
  3051.      * $PREVLINK$ -- Previous link markup. See Conditional Links for more
  3052.        information.
  3053.      * $PREVMSG$ -- Filename of previous message according to the list
  3054.        order of the main index.
  3055.      * $PREVMSGNUM$ -- Number assigned to previous message according to
  3056.        the list order of the main index.
  3057.      * $PREVSUBJECT$ -- Subject of previous message according to the list
  3058.        order of the main index.
  3059.      * $PROG$ -- Program name.
  3060.      * $SUBJECTNA$ -- Message subject text.
  3061.      * $TIDXFNAME$ -- Filename of thread index page.
  3062.      * $TIDXTITLE$ -- Title of thread index page.
  3063.      * $VERSION$ -- Program version.
  3064.      * $YYMMDD$ -- Message date in yy/mm/dd format.
  3065.        
  3066.   BOTLINKS
  3067.   
  3068.    
  3069.    
  3070.    The BOTLINKS resource element defines the layout of the navigational
  3071.    links at the bottom of each message page. The markup defined, will
  3072.    appear after the filtered message data and any thread links, and
  3073.    before the MSGFOOT data.
  3074.    
  3075.    The default value for BOTLINKS is the following:
  3076. <BOTLINKS>
  3077. <HR>
  3078. <UL>
  3079. $PREVLINK$
  3080. $NEXTLINK$
  3081. <LI>Index(es):
  3082. <UL>
  3083. <LI><A HREF="$IDXFNAME$#$MSGNUM$"><STRONG>Main</STRONG></A></LI>
  3084. <LI><A HREF="$TIDXFNAME$#$MSGNUM$"><STRONG>Thread</STRONG></A></LI>
  3085. </BOTLINKS>
  3086.  
  3087.    
  3088.    
  3089.    If no thread index is specified, then the thread link markup is
  3090.    removed. The variables available for BOTLINKS are the same as for
  3091.    TOPLINKS.
  3092.    
  3093.   CONDITIONAL LINKS
  3094.   
  3095.    
  3096.    
  3097.    Since the state of some navigational links can change due the position
  3098.    of the message in the archive (eg. first and last messages), special
  3099.    resources exist that allows you to control the markup of some of the
  3100.    links based upon if the link is valid or not for a given message.
  3101.    
  3102.    The resource elements for defining the conditional links are the
  3103.    following: PREVBUTTON, NEXTBUTTON, PREVLINK, and NEXTLINK, and their
  3104.    inactive counterparts, PREVBUTTONIA, NEXTBUTTONIA, PREVLINKIA, and
  3105.    NEXTLINKIA. The appropriate value of these elements (ie. if it is
  3106.    active, or inactive) are represented by the $PREVBUTTON$,
  3107.    $NEXTBUTTON$, $PREVLINK$, and $NEXTLINK$ resource file variables,
  3108.    respectively, which may be used in other resource elements' contents
  3109.    (TOPLINKS and BOTLINKS in particular).
  3110.    
  3111.    The defaults values for each conditional link resource is as follows:
  3112.    
  3113.    PREVBUTTON
  3114. <PREVBUTTON>
  3115. <A HREF="$PREVMSG$">[Prev]</A>
  3116. </PREVBUTTON>
  3117.  
  3118.    
  3119.    
  3120.    NEXTBUTTON
  3121. <NEXTBUTTON>
  3122. <A HREF="$NEXTMSG$">[Next]</A>
  3123. </NEXTBUTTON>
  3124.  
  3125.    
  3126.    
  3127.    PREVLINK
  3128. <PREVLINK>
  3129. <LI>Prev: <STRONG><A HREF="$PREVMSG$">$PREVSUBJECT$</A></STRONG></LI>
  3130. </PREVLINK>
  3131.  
  3132.    
  3133.    
  3134.    NEXTLINK
  3135. <NEXTLINK>
  3136. <LI>Next: <STRONG><A HREF="$NEXTMSG$">$NEXTSUBJECT$</A></STRONG></LI>
  3137. </NEXTLINK>
  3138.  
  3139.    
  3140.    
  3141.    All the "IA" elements default to empty content.
  3142.    
  3143.    NOTE
  3144.           
  3145.           
  3146.           The last newline for the PREVBUTTON, NEXTBUTTON, PREVBUTTONIA,
  3147.           and NEXTBUTTONIA elements is ignored by MHonArc. This allows a
  3148.           "tight" grouping of button links; ie. no space between buttons.
  3149.           If you desire to have a newline in the content, just insert a
  3150.           trailing blank line at the end of the element's content.
  3151.           
  3152.    
  3153.    
  3154.    You should note that there is a correlation between the value of the
  3155.    conditional links elements and the contents of the TOPLINKS and
  3156.    BOTLINKS elements.
  3157.    
  3158.    The following variables may be used within the conditional link
  3159.    elements.
  3160.      * $NEXTFROM$ -- Contenst of From field of the next message according
  3161.        to the list order of the main index.
  3162.      * $NEXTFROMADDR$ -- E-mail address contained in From field of the
  3163.        next message according to the list order of the main index.
  3164.      * $NEXTFROMNAME$ -- English" name contained in From field of the
  3165.        next message according to the list order of the main index.
  3166.      * $NEXTMSG$ -- Filename of next message according to the list order
  3167.        of the main index.
  3168.      * $NEXTMSGNUM$ -- Number assigned to next message according to the
  3169.        list order of the main index.
  3170.      * $NEXTSUBJECT$ -- Subject of next message according to the list
  3171.        order of the main index.
  3172.      * $PREVFROM$ -- Contenst of From field of the previous message
  3173.        according to the list order of the main index.
  3174.      * $PREVFROMADDR$ -- E-mail address contained in From field of the
  3175.        previous message according to the list order of the main index.
  3176.      * $PREVFROMNAME$ -- English" name contained in From field of the
  3177.        previous message according to the list order of the main index.
  3178.      * $PREVMSG$ -- Filename of previous message according to the list
  3179.        order of the main index.
  3180.      * $PREVMSGNUM$ -- Number assigned to previous message according to
  3181.        the list order of the main index.
  3182.      * $PREVSUBJECT$ -- Subject of previous message according to the list
  3183.        order of the main index.
  3184.        
  3185.    
  3186.    
  3187.    WARNING
  3188.           
  3189.           
  3190.           Never include conditional link variables ($PREVBUTTON$,
  3191.           $NEXTBUTTON$, $PREVLINK$, and $NEXTLINK$) in conditional link
  3192.           element content. This will cause an infinite loop during
  3193.           execution and will eventually lead to a crash due to a lack of
  3194.           memory.
  3195.           
  3196.    
  3197.      _________________________________________________________________
  3198.    
  3199. Message Layout 
  3200.  
  3201.    
  3202.    
  3203.    Defining the format for the actual mail message data is divided into
  3204.    two parts: the message head and the message body. Customizing the
  3205.    message header markup is described in this section, but due to the
  3206.    nature of how messages are processed, the message body format is
  3207.    controlled by the various MIME filters directly (see the section on
  3208.    MIME for further details).
  3209.    
  3210.   EXCLUDING FIELDS
  3211.   
  3212.    
  3213.    
  3214.    The EXCS resource allows you to specify what fields should be excluded
  3215.    in the HTML output.
  3216.    
  3217.     EXCS
  3218.     
  3219.    
  3220.    
  3221.    Each line of the EXCS element specifies a mail header field to exclude
  3222.    in the converted HTML output. Each line is treated as a Perl regular
  3223.    expression (NOTE: the regular expression is already anchored to the
  3224.    begining of the line).
  3225.    
  3226.    The default value for EXCS is the following:
  3227. <EXCS>
  3228. content-
  3229. errors-to
  3230. forward
  3231. lines
  3232. message-id
  3233. mime-
  3234. nntp-
  3235. originator
  3236. path
  3237. precedence
  3238. received
  3239. replied
  3240. return-path
  3241. status
  3242. via
  3243. x-
  3244. </EXCS>
  3245.  
  3246.    
  3247.    
  3248.    Any fields you specify for the EXCS resource will augment the default
  3249.    list, unless the "Override" attribute is specified. If "Override" is
  3250.    specified, the default list is discarded along with any other lists
  3251.    specified from previous EXCS elements; and only header fields
  3252.    specified in the EXCS element are excluded.
  3253.    
  3254.   FIELD ORDER
  3255.   
  3256.    
  3257.    
  3258.    The FIELDORDER resource allows you to control the order the message
  3259.    header fields appear in the HTML output.
  3260.    
  3261.     FIELDORDER
  3262.     
  3263.    
  3264.    
  3265.    Each line of the FIELDORDER element is the exact case-insensitive name
  3266.    of a message header field. The order the fields are listed is the
  3267.    order they will appear in the filtered message. The special field
  3268.    value "-extra-" represents all fields not explicitly specified in the
  3269.    FIELDORDER element and not excluded by the EXCS element. Extra fields
  3270.    are listed in sorted order.
  3271.    
  3272.    The following represents the default value of the FIELDORDER resource:
  3273. <FIELDORDER>
  3274. to
  3275. subject
  3276. from
  3277. date
  3278. -extra-
  3279. </FIELDORDER>
  3280.  
  3281.   FIELD FORMATTING
  3282.   
  3283.    
  3284.    
  3285.    The FIELDSTYLES and LABELSTYLES resources allow to control how each
  3286.    message header field is formatted.
  3287.    
  3288.     FIELDSTYLES
  3289.     
  3290.    
  3291.    
  3292.    Each line in the FIELDSTYLES element defines HTML elements to wrap
  3293.    around the field text in mail headers (e.g. "To: field text", "From:
  3294.    field text"). The format of each line is "field_name:html_element".
  3295.    This specifies to wrap html_element around the text associated with
  3296.    field_name. If html_element is empty, then the field text is not
  3297.    wrapped in any element.
  3298.    
  3299.    MHonArc defines a special field_name called "-default-". This is
  3300.    default HTML element to wrap field text in if no explicit specific
  3301.    element is defined for the label.
  3302.    
  3303.    field_name must be the exact name of a header field name, but
  3304.    character case is ignored.
  3305.    
  3306.    The default value of FIELDSTYLES is the following:
  3307. <FIELDSTYLES>
  3308. -default-
  3309. </FIELDSTYLES>
  3310.  
  3311.     LABELSTYLES
  3312.     
  3313.    
  3314.    
  3315.    Each line in the LABELSTYLES element defines HTML elements to wrap
  3316.    around labels in mail headers (e.g. "To:", "From:"). The format of
  3317.    each line is "field_name:html_element". This specifies to wrap
  3318.    html_element around field_name. If html_element is empty, then the
  3319.    label is not wrapped in any element.
  3320.    
  3321.    MHonArc defines a special field_name called "-default-". This is
  3322.    default HTML element to wrap a label in if no explicit specific
  3323.    element is defined for the label.
  3324.    
  3325.    field_name must be the exact name of a header field name, but
  3326.    character case is ignored.
  3327.    
  3328.    The default value of LABELSTYLES is the following:
  3329. <LABELSTYLES>
  3330. -default-:em
  3331. </LABELSTYLES>
  3332.  
  3333.    
  3334.      _________________________________________________________________
  3335.    
  3336. Other Resources 
  3337.  
  3338.   E-MAIL LINKS
  3339.   
  3340.     MAILTOURL 
  3341.     
  3342.    
  3343.    
  3344.    URL to use for e-mail address hyperlinks in e-mail message header
  3345.    fields. The following variables are defined for the MAILTOURL
  3346.    resource:
  3347.      * $FROM$ -- Who the message is from.
  3348.      * $MSGID$ -- Message ID of the message.
  3349.      * $SUBJECT$ -- The subject of the message.
  3350.      * $TO$ -- Destination e-mail address of link.
  3351.        
  3352.    
  3353.    
  3354.    MHonArc will use the following URL by default: "mailto:$TO$".
  3355.    
  3356.    NOTE
  3357.           
  3358.           
  3359.           The MAILTOURL resource has different rules for variable
  3360.           expansion. If a variable does not exactly match the set of
  3361.           variables available for the MAILTOURL, the variable text will
  3362.           be taken literally as part of the element content. Therefore, a
  3363.           single "$" can be used to represent a "$" character.
  3364.           
  3365.           Also, variables in the MAILTOURL should NOT have ":NU"
  3366.           modifier. This will prevent the variables from be recognized.
  3367.           MHonArc will automatically treat the replacement value as a
  3368.           part of a URL string.
  3369.           
  3370.    
  3371.      _________________________________________________________________
  3372.    
  3373.  
  3374.      _________________________________________________________________
  3375.    
  3376.                                     MIME
  3377.                                        
  3378.    
  3379.    
  3380.    MHonArc has support for e-mail messages with Multipurpose Internet
  3381.    Mail Extensions (MIME) as defined in RFC 1521. MHonArc handles the
  3382.    filtering of the various content-types used in MIME in a modular
  3383.    fashion. Since new content-types are occasionally defined for MIME,
  3384.    this modularity allows users to add new filters to accomodate new
  3385.    content-types. Also, filters can be hooked in to override MHonArc's
  3386.    default filters, or provide MHonArc with the ability to process
  3387.    existing content-types that it cannot handle currently.
  3388.      _________________________________________________________________
  3389.    
  3390. Default Filters
  3391.  
  3392.    
  3393.    
  3394.    The default filters provided by MHonArc supports the following MIME
  3395.    content-types, which may be overriden by user-defined filters:
  3396.      * application/*
  3397.      * audio/*
  3398.      * image/*
  3399.      * message/news
  3400.      * message/partial
  3401.      * message/rfc822
  3402.      * multipart/alternative
  3403.      * multipart/digest
  3404.      * multipart/mixed
  3405.      * multipart/parallel
  3406.      * text/html
  3407.      * text/plain
  3408.      * text/setext
  3409.      * video/*
  3410.        
  3411.    
  3412.    
  3413.    For more information on how to write your filters, or replace existing
  3414.    filters, see Writing Filters.
  3415.    
  3416.    The next sections describes how MHonArc processes the content-types
  3417.    listed above.
  3418.  
  3419.   APPLICATION/*
  3420.   
  3421.    
  3422.    
  3423.    MHonArc extracts the data into a separate file and puts a hyperlink to
  3424.    the file into the HTMLized message.
  3425.    
  3426.    By default, MHonArc ignores any filename specification (the "name"
  3427.    attribute as defined in the Content-Type header field) given in the
  3428.    message when writing the data to disk. MHonArc generates a unique
  3429.    filename with an extenstion based upon sub-type.
  3430.    
  3431.    If you want MHonArc to use the filename, then you can use the MIMEARGS
  3432.    resource and specify an argument string of "usename".
  3433.    
  3434.    Example:
  3435. <MIMEARGS>
  3436. application/postscript:usename
  3437. </MIMEARGS>
  3438.  
  3439.    
  3440.    
  3441.    If you want MHonArc to use specified filename for all application
  3442.    types, then use the following:
  3443. <MIMEARGS>
  3444. application/*:usename
  3445. </MIMEARGS>
  3446.  
  3447.    CAUTION
  3448.           
  3449.           
  3450.           The use of "usename" is discouraged since it can lead to
  3451.           filename conflicts and security problems.
  3452.           
  3453.    
  3454.    
  3455.    Here is the current list of application sub-types (with their filename
  3456.    extensions) supported by MHonArc:
  3457.      * mac-binhex40 (hqx)
  3458.      * octet-stream (bin)
  3459.      * oda (oda)
  3460.      * pdf (pdf)
  3461.      * postscript (ps)
  3462.      * rtf (rtf)
  3463.      * x-bcpio (bcpio)
  3464.      * x-cpio (cpio)
  3465.      * x-csh (csh)
  3466.      * x-dvi (dvi)
  3467.      * x-gtar (gtar)
  3468.      * x-hdf (hdf)
  3469.      * x-latex (latex)
  3470.      * x-mif (mif)
  3471.      * x-netcdf (cdf)
  3472.      * x-patch (no extension; processed by the text/plain filter)
  3473.      * x-sh (sh)
  3474.      * x-shar (shar)
  3475.      * x-sv4cpio (sv4cpio)
  3476.      * x-sv4crc (sv4crc)
  3477.      * x-tar (tar)
  3478.      * x-tcl (tcl)
  3479.      * x-tex (tex)
  3480.      * x-texinfo (texinfo)
  3481.      * x-troff (roff)
  3482.      * x-troff-man (man)
  3483.      * x-troff-me (me)
  3484.      * x-troff-ms (ms)
  3485.      * x-ustar (ustar)
  3486.      * x-wais-source (src)
  3487.      *
  3488.        
  3489.        zip (zip)
  3490.        
  3491.   AUDIO/*
  3492.   
  3493.    
  3494.    
  3495.    MHonArc extracts the data into a separate file and puts a hyperlink to
  3496.    the file into the HTMLized message. The name of the file created
  3497.    follows the same guidelines mentioned under application/*.
  3498.    
  3499.    Here is the current list of audio sub-types (with their filename
  3500.    extensions) supported by MHonArc:
  3501.      * basic (snd)
  3502.      * x-aiff (aif)
  3503.      *
  3504.        
  3505.        x-wav (wav)
  3506.        
  3507.   IMAGE/*
  3508.   
  3509.    
  3510.    
  3511.    MHonArc will extract the data into a separate file and puts a
  3512.    hyperlink to the file into the HTMLized message. The name of the file
  3513.    created follows the same guidelines mentioned under application/*. In
  3514.    addition to the filename specification mentioned under application/*,
  3515.    an "inline" argument may be declared to instruct MHonArc to inline the
  3516.    image in the generated HTML.
  3517.    
  3518.    Example:
  3519. <MIMEARGS>
  3520. image/gif:inline
  3521. </MIMEARGS>
  3522.  
  3523.    
  3524.    
  3525.    The following examples says to inline XBM images and use the name
  3526.    attribute as the filename if defined:
  3527. <MIMEARGS>
  3528. image/x-xbm:inline usename
  3529. </MIMEARGS>
  3530.  
  3531.    
  3532.    
  3533.    The following represents the default argument settings used by
  3534.    MHonArc:
  3535. <MIMEARGS>
  3536. image/gif:inline
  3537. image/x-xbitmap:inline
  3538. image/x-xbm:inline
  3539. </MIMEARGS>
  3540.  
  3541.    
  3542.    
  3543.    Here is the current list of image sub-types (with their filename
  3544.    extensions) supported by MHonArc:
  3545.      * gif (gif)
  3546.      * ief (ief)
  3547.      * jpeg (jpg)
  3548.      * tiff (tif)
  3549.      * x-bmp (bmp)
  3550.      * x-cmu-raster (ras)
  3551.      * x-pcx (pcx)
  3552.      * x-pict (pict)
  3553.      * x-portable-anymap (pnm)
  3554.      * x-pnm (pnm)
  3555.      * x-portable-bitmap (pbm)
  3556.      * x-pbm (pbm)
  3557.      * x-portable-graymap (pgm)
  3558.      * x-pgm (pgm)
  3559.      * x-portable-pixmap (ppm)
  3560.      * x-ppm (ppm)
  3561.      * x-rgb (rgb)
  3562.      * x-xbitmap (xbm)
  3563.      * x-xbm (xbm)
  3564.      * x-xpixmap (xpm)
  3565.      * x-xpm (xpm)
  3566.      * x-xwindowdump (xwd)
  3567.      *
  3568.        
  3569.        x-xwd (xwd)
  3570.        
  3571.    
  3572.    
  3573.    If the image is a GIF or XBM (X bitmap), the HTML IMG element will be
  3574.    used to in-line the image into the HTMLized message.
  3575.    
  3576.   MESSAGE/NEWS
  3577.   
  3578.    
  3579.    
  3580.    message/news signifies an included (MIME) USENET news message. The
  3581.    data associated with a message/news part is processed by MHonArc in
  3582.    the same manner as a regular mail message.
  3583.    
  3584.   MESSAGE/PARTIAL
  3585.   
  3586.    
  3587.    
  3588.    message/partial signifies that the content is a single part of a
  3589.    message split into multiple mail messages. message/partial is treated
  3590.    in the same manner as text/plain.
  3591.    
  3592.   MESSAGE/RFC822
  3593.   
  3594.    
  3595.    
  3596.    message/rfc822 signifies an included (MIME) mail message. The data
  3597.    associated with a message/rfc822 part is processed by MHonArc in the
  3598.    same manner as a regular mail message.
  3599.    
  3600.   MULTIPART/ALTERNATIVE
  3601.   
  3602.    
  3603.    
  3604.    multipart/alternative signifies multiple content-types with the same
  3605.    (or similiar) information. MHonArc processes only the latest part that
  3606.    has a content-type filter.
  3607.    
  3608.   MULTIPART/DIGEST
  3609.   
  3610.    
  3611.    
  3612.    mulltipart/digest signifies a series of included mail messages. Each
  3613.    part is processed in the same manner as message/rfc822 unless an
  3614.    explicit content-type is specifed for each part.
  3615.    
  3616.   MULTIPART/MIXED
  3617.   
  3618.    
  3619.    
  3620.    multipart/mixed signifies data with multiple content-types. MHonArc
  3621.    extracts each part and calls the appropriate content-type filter for
  3622.    each part, if defined.
  3623.    
  3624.   MULTIPART/PARALLEL
  3625.   
  3626.    
  3627.    
  3628.    multipart/parallel is processed in the same manner as multipart/mixed.
  3629.    
  3630.   TEXT/HTML
  3631.   
  3632.    
  3633.    
  3634.    text/html signifies that the data is HTML markup. The data as left "as
  3635.    is" with the exception of some processing to legally include the HTML
  3636.    into the HTMLized mail message. I.e. MHonArc removes the HEAD an BODY
  3637.    tags, the TITLE element will be replaced with an ADDRESS element
  3638.    surrounded by HR's, and the BASE element URL will be propogated to
  3639.    relative URLs.
  3640.    
  3641.   TEXT/PLAIN
  3642.   
  3643.    
  3644.    
  3645.    text/plain signifies ASCII character data. In the HTMLized message,
  3646.    the data is wrapped in a PRE element with special characters (< > &)
  3647.    converted to entity references. MHonArc will also make any URLs into
  3648.    hyperlinks. The following URL types are recognized:
  3649.      * http://...
  3650.      * ftp://...
  3651.      * afs://...
  3652.      * wais://...
  3653.      * telnet://...
  3654.      * gopher://...
  3655.      * news:...
  3656.      * nntp:...
  3657.      * mid:...
  3658.      * cid:...
  3659.      * mailto:...
  3660.      *
  3661.        
  3662.        prospero:...
  3663.        
  3664.   TEXT/SETEXT
  3665.   
  3666.    
  3667.    
  3668.    text/setext signifies "structure enhanced text". The data is converted
  3669.    into HTML containing hyperlinks as defined by the setext data. For
  3670.    more information on setext, see <URL:http://www.bsdi.com/setext/>.
  3671.    
  3672.   VIDEO/*
  3673.   
  3674.    
  3675.    
  3676.    MHonArc extracts the data into a separate file and puts a hyperlink to
  3677.    the file into the HTMLized message. The name of the file created
  3678.    follows the same guidelines mentioned under application/*.
  3679.    
  3680.    Here is the current list of video sub-types (with their filename
  3681.    extensions) supported by MHonArc:
  3682.      * mpeg (mpg)
  3683.      * quicktime (mov)
  3684.      * x-msvideo (avi)
  3685.      * x-sgi-movie (movie)
  3686.        
  3687.    
  3688.      _________________________________________________________________
  3689.    
  3690. Non-MIME Messages 
  3691.  
  3692.    
  3693.    
  3694.    Messages that do not contain a MIME Content-Type header field are
  3695.    processed as text/plain messages.
  3696.      _________________________________________________________________
  3697.    
  3698. Writing Filters
  3699.  
  3700.    
  3701.    
  3702.    If you want to write your own filter for use in MHonArc, you need to
  3703.    know the Perl programming language. The following information assumes
  3704.    you know Perl. To learn how to hook in your filters into MHonArc, see
  3705.    Specifying Filters.
  3706.    
  3707.   FUNCTION INTERFACE OF FILTER
  3708.   
  3709.    
  3710.    
  3711.    MHonArc interfaces with MIME filters by calling a routine with a
  3712.    specific set of arguments. The prototype of the interface routine is
  3713.    as follows:
  3714. sub filter {
  3715.     local($head, *fields, $data, $decoded, $argstring) = @_;
  3716.  
  3717.     # Filter code here
  3718.  
  3719.     # The last statement should be the return value, unless an
  3720.     # explicit return is done. See the following for the format of the
  3721.     # return value.
  3722. }
  3723.  
  3724.     Argument Descriptions
  3725.     
  3726.    $head
  3727.           
  3728.           
  3729.           This is the header text of the message (or body part if called
  3730.           in a mulitpart message).
  3731.           
  3732.    *fields
  3733.           
  3734.           
  3735.           This is a pointer to an associative array that has broken down
  3736.           $head into field label/field value components. The keys are the
  3737.           lower-case representations of the field values. Example: If you
  3738.           would like to retrieve the value of the Content-Type field,
  3739.           then use the following: $fields{`content-type'}.
  3740.           
  3741.           If a field occurs more than once in a header, MHonArc separates
  3742.           the field values in the associative array by a `\034'
  3743.           character. To make your filter less likely to break due to
  3744.           changes in MHonArc, you may use the $'X variable instead of
  3745.           `\034'.
  3746.           
  3747.    $data
  3748.           
  3749.           
  3750.           This is a copy of the message (or body part if called in a
  3751.           mulitpart message) body.
  3752.           
  3753.    $decoded
  3754.           
  3755.           
  3756.           This flag is set to 1 if MHonArc decoded the message and $data
  3757.           represents the orginal data before encoded by the sender. If
  3758.           set to 0, $data has not been decoded. The failure to decode
  3759.           occurs if MHonArc does not recognizeed the encoding specified
  3760.           in the Content-Transfer-Encoding field.
  3761.           
  3762.           MHonArc has decoded the data for you if it was encoded in
  3763.           7-Bit, 8-Bit, Binary, Quoted-Printable, Base64, or X-Uuencode.
  3764.           
  3765.    $argstring
  3766.           
  3767.           
  3768.           This is an optional argument string that may be used to modify
  3769.           the behavior of the filter. The format of this string is
  3770.           determined by the filter itself.
  3771.           
  3772.           The value of the string is set by the MIMEARGS resource.
  3773.           
  3774.     Return Value
  3775.     
  3776.    
  3777.    
  3778.    The return value is treated as an array. The first item in the array
  3779.    is a string representing the HTML markup to insert in the HTMLized
  3780.    message. An empty string may be returned to tell MHonArc that the
  3781.    routine was unable to filter data.
  3782.    
  3783.    Any other array items are treated as names of any files that were
  3784.    generated by the filter. MHonArc needs to keep track if any extra
  3785.    files that a filter may generate in order for MHonArc to delete those
  3786.    files if the message gets removed from the archive.
  3787.    
  3788.   FILTER WRITING TIPS
  3789.   
  3790.    
  3791.    
  3792.    The following recommendations/tips are given to help you write
  3793.    filters:
  3794.      *
  3795.        
  3796.        Qualify your filter in its own package. This eliminates possible
  3797.        variable/routine conflicts with MHonArc.
  3798.      *
  3799.        
  3800.        If the filter creates derived files (like the image filters), you
  3801.        may use the variable $'OUTDIR to determine the location of the
  3802.        mail archive.
  3803.        
  3804.        NOTE: Do not include $'OUTDIR as part as the filename that is
  3805.        returned to MHonArc. If the filter does create files, just return
  3806.        the base name.
  3807.      *
  3808.        
  3809.        Look at the default filters contained in the distribution of
  3810.        MHonArc. You can use these as templates for writing your own.
  3811.      *
  3812.        
  3813.        Make sure your Perl source file ends with a true statement (like
  3814.        "1;"). MHonArc just performs a require on the file, and if the
  3815.        file does not return true, Perl will abort execution.
  3816.        
  3817.   USING C
  3818.   
  3819.    
  3820.    
  3821.    If a MIME filter requires the utilization of a C program, or other
  3822.    non-Perl executable, a Perl wrapper must be written for the program
  3823.    in-order to interface with MHonArc. The wrapper must follow the rules
  3824.    as specified in Function Interface of Filter.
  3825.      _________________________________________________________________
  3826.    
  3827. Specifying Filters
  3828.  
  3829.    
  3830.    
  3831.    Adding new filters, or overriding existing ones, are done via the
  3832.    Resource File. The two resources for specifying and controlling MIME
  3833.    filters are MIMEFILTERS and MIMEARGS.
  3834.    
  3835.   MIMEFILTERS
  3836.   
  3837.    
  3838.    
  3839.    The resource element MIMEFILTERS in the Resource File is used to hook
  3840.    in user specifed filters into MHonArc. The syntax for each line of the
  3841.    the MIMEFILTERS element is as follows:
  3842.    
  3843.    <content-type>:<routine-name>:<file-of-routine>
  3844.    
  3845.    The definition of each colon-separated value is as follows:
  3846.    
  3847.    <content-type>
  3848.           
  3849.           
  3850.           The MIME content-type the filter processes.
  3851.           
  3852.    <routine-name>
  3853.           
  3854.           
  3855.           The actual routine name of the filter. The name should be fully
  3856.           qualified by the package it is definedi (e.g.
  3857.           "mypackage'filter").
  3858.           
  3859.    <file-of-routine>
  3860.           
  3861.           
  3862.           The name of the file that defines <routine-name>. If the file
  3863.           is not a full pathname, MHonArc finds the file by looking in
  3864.           the standard include paths of Perl, and the paths specified by
  3865.           the PERLINC resource element.
  3866.           
  3867.    
  3868.    
  3869.    Any whitespace is stripped out before processing.
  3870.    
  3871.     Example
  3872.     
  3873.    
  3874.    
  3875.    The following represents the default value of MIMEFILTERS:
  3876. <MIMEFILTERS>
  3877. application/mac-binhex40:m2h_external'filter:mhexternal.pl
  3878. application/octet-stream:m2h_external'filter:mhexternal.pl
  3879. application/oda:m2h_external'filter:mhexternal.pl
  3880. application/pdf:m2h_external'filter:mhexternal.pl
  3881. application/postscript:m2h_external'filter:mhexternal.pl
  3882. application/rtf:m2h_external'filter:mhexternal.pl
  3883. application/x-bcpio:m2h_external'filter:mhexternal.pl
  3884. application/x-cpio:m2h_external'filter:mhexternal.pl
  3885. application/x-csh:m2h_external'filter:mhexternal.pl
  3886. application/x-dvi:m2h_external'filter:mhexternal.pl
  3887. application/x-gtar:m2h_external'filter:mhexternal.pl
  3888. application/x-hdf:m2h_external'filter:mhexternal.pl
  3889. application/x-latex:m2h_external'filter:mhexternal.pl
  3890. application/x-mif:m2h_external'filter:mhexternal.pl
  3891. application/x-netcdf:m2h_external'filter:mhexternal.pl
  3892. application/x-patch:m2h_text_plain'filter:mhtxtplain.pl
  3893. application/x-sh:m2h_external'filter:mhexternal.pl
  3894. application/x-shar:m2h_external'filter:mhexternal.pl
  3895. application/x-sv4cpio:m2h_external'filter:mhexternal.pl
  3896. application/x-sv4crc:m2h_external'filter:mhexternal.pl
  3897. application/x-tar:m2h_external'filter:mhexternal.pl
  3898. application/x-tcl:m2h_external'filter:mhexternal.pl
  3899. application/x-tex:m2h_external'filter:mhexternal.pl
  3900. application/x-texinfo:m2h_external'filter:mhexternal.pl
  3901. application/x-troff-man:m2h_external'filter:mhexternal.pl
  3902. application/x-troff-me:m2h_external'filter:mhexternal.pl
  3903. application/x-troff-ms:m2h_external'filter:mhexternal.pl
  3904. application/x-troff:m2h_external'filter:mhexternal.pl
  3905. application/x-ustar:m2h_external'filter:mhexternal.pl
  3906. application/x-wais-source:m2h_external'filter:mhexternal.pl
  3907. application/zip:m2h_external'filter:mhexternal.pl
  3908. audio/basic:m2h_external'filter:mhexternal.pl
  3909. audio/x-aiff:m2h_external'filter:mhexternal.pl
  3910. audio/x-wav:m2h_external'filter:mhexternal.pl
  3911. image/gif:m2h_external'filter:mhexternal.pl
  3912. image/ief:m2h_external'filter:mhexternal.pl
  3913. image/jpeg:m2h_external'filter:mhexternal.pl
  3914. image/tiff:m2h_external'filter:mhexternal.pl
  3915. image/x-bmp:m2h_external'filter:mhexternal.pl
  3916. image/x-cmu-raster:m2h_external'filter:mhexternal.pl
  3917. image/x-pbm:m2h_external'filter:mhexternal.pl
  3918. image/x-pcx:m2h_external'filter:mhexternal.pl
  3919. image/x-pgm:m2h_external'filter:mhexternal.pl
  3920. image/x-pict:m2h_external'filter:mhexternal.pl
  3921. image/x-pnm:m2h_external'filter:mhexternal.pl
  3922. image/x-portable-anymap:m2h_external'filter:mhexternal.pl
  3923. image/x-portable-bitmap:m2h_external'filter:mhexternal.pl
  3924. image/x-portable-graymap:m2h_external'filter:mhexternal.pl
  3925. image/x-portable-pixmap:m2h_external'filter:mhexternal.pl
  3926. image/x-ppm:m2h_external'filter:mhexternal.pl
  3927. image/x-rgb:m2h_external'filter:mhexternal.pl
  3928. image/x-xbitmap:m2h_external'filter:mhexternal.pl
  3929. image/x-xbm:m2h_external'filter:mhexternal.pl
  3930. image/x-xpixmap:m2h_external'filter:mhexternal.pl
  3931. image/x-xpm:m2h_external'filter:mhexternal.pl
  3932. image/x-xwd:m2h_external'filter:mhexternal.pl
  3933. image/x-xwindowdump:m2h_external'filter:mhexternal.pl
  3934. message/partial:m2h_text_plain'filter:mhtxtplain.pl
  3935. text/html:m2h_text_html'filter:mhtxthtml.pl
  3936. text/plain:m2h_text_plain'filter:mhtxtplain.pl
  3937. text/richtext:m2h_text_plain'filter:mhtxtplain.pl
  3938. text/setext:m2h_text_setext'filter:mhtxtsetext.pl
  3939. text/tab-separated-values:m2h_text_plain'filter:mhtxtplain.pl
  3940. text/x-html:m2h_text_html'filter:mhtxthtml.pl
  3941. text/x-setext:m2h_text_setext'filter:mhtxtsetext.pl
  3942. video/mpeg:m2h_external'filter:mhexternal.pl
  3943. video/quicktime:m2h_external'filter:mhexternal.pl
  3944. video/x-msvideo:m2h_external'filter:mhexternal.pl
  3945. video/x-sgi-movie:m2h_external'filter:mhexternal.pl
  3946. </MIMEFILTERS>
  3947.  
  3948.   MIMEARGS 
  3949.   
  3950.    
  3951.    
  3952.    The MIMEARGS resource may be used to pass optional arguments to
  3953.    filters to control their behavior. Arguments may be defined on a per
  3954.    content-type basis, or for a specific filter itself. The syntax for
  3955.    each line of the the MIMEARGS element is as follows:
  3956.    
  3957.    <content-type>:<argument-string>
  3958.    
  3959.    Or,
  3960.    
  3961.    <filter-name>:<argument-string>
  3962.    
  3963.    The format of argument strings is dependent on the filter that
  3964.    processes <content-type> or by the specified filter, <filter-name>.
  3965.    
  3966.    If an argument string is defined for a filter explicitly and for a
  3967.    content-type that the filter processes, the content-type string will
  3968.    override the filter string.
  3969.    
  3970.     Examples
  3971.     
  3972.    
  3973.    
  3974.    The following example represents the default settings used by MHonArc:
  3975. <MIMEARGS>
  3976. image/gif:inline
  3977. image/x-xbitmap:inline
  3978. image/x-xbm:inline
  3979. </MIMEARGS>
  3980.  
  3981.    
  3982.    
  3983.    The following example tells the filter that deals handles
  3984.    content-types that cannot be converted directly into HTML to use the
  3985.    "name" attribute as defined in the Content-Type header field as the
  3986.    name of the file generated:
  3987. <MIMARGS>
  3988. m2h_external'filter:usename
  3989. </MIMEARGS>
  3990.  
  3991.    
  3992.    
  3993.    The following examples says to inline XBM images and use the name
  3994.    attribute as the filename if defined:
  3995. <MIMEARGS>
  3996. image/x-xbm:inline usename
  3997. </MIMEARGS>
  3998.  
  3999.    
  4000.      _________________________________________________________________
  4001.    
  4002.  
  4003.      _________________________________________________________________
  4004.    
  4005.                                 GORY DETAILS
  4006.                                        
  4007.    
  4008.    
  4009.    This sections explain in detail how MHonArc functions. Knowing the
  4010.    material covered in this section may help you when trouble shooting.
  4011.      _________________________________________________________________
  4012.    
  4013. OS Detection 
  4014.  
  4015.    
  4016.    
  4017.    MHonArc will automatically detect which operating system it is running
  4018.    under. If the following list of conditions are true, MHonArc assumes
  4019.    it is running under MS-DOS:
  4020.      * The COMSPEC environment variable is defined.
  4021.      * The value of the COMSPEC environment variable is a legal MS-DOS
  4022.        pathname.
  4023.      *
  4024.        
  4025.        The value of the COMSPEC environment variable is an executable
  4026.        file.
  4027.        
  4028.    
  4029.    
  4030.    If any of the above conditions is false, MHonArc assumes it is running
  4031.    under Unix.
  4032.    
  4033.    NOTE
  4034.           
  4035.           
  4036.           The previous conditions are used since the conditions will
  4037.           exist if Perl has been installed on an MS-DOS machine. None of
  4038.           the above conditions exist when Perl is installed on a Unix
  4039.           system.
  4040.           
  4041.    
  4042.      _________________________________________________________________
  4043.    
  4044. Processing Steps 
  4045.  
  4046.    
  4047.    
  4048.    This section describes the steps MHonArc performs when
  4049.    creating/editting an archive. Anytime messages are added or deleted or
  4050.    the index page layout is changed, MHonArc will perform the following
  4051.    steps.
  4052.      *
  4053.        
  4054.        Creates a lock file. This insures only one MHonArc process is
  4055.        updating the archive at any given moment. See Archive Integrity
  4056.        for more information.
  4057.      *
  4058.        
  4059.        Reads the database file. The name, and location, of the database
  4060.        file can be explicitly specified via the M2H_DBFILE and M2H_OUTDIR
  4061.        environment variables or the command-line options -dbfile and
  4062.        -outdir. Otherwise, the current working directory is used.
  4063.        
  4064.        NOTE: The database file must be in the same location as the
  4065.        archive since the M2H_OUTDIR variable and -outdir option also
  4066.        specify the location of the archive.
  4067.        
  4068.        The database file contains data to update any mail threads and the
  4069.        resource settings when MHonArc was last invoked. This allows new
  4070.        messages to contain the same formatting/resource specifications as
  4071.        existing messages in the archive without having to re-specify the
  4072.        resources each time new messages are added. Resources defined in
  4073.        the database file override the environment variables.
  4074.        
  4075.        NOTE: If no database file is found, MHonArc will create a new
  4076.        archive.
  4077.      *
  4078.        
  4079.        Read the MHonArc resource file, if specified. The resource file
  4080.        will override any settings contained in the database file.
  4081.      *
  4082.        
  4083.        Read the settings specified on the command-line. Command-line
  4084.        options override any settings in the database and/or resource
  4085.        file.
  4086.      *
  4087.        
  4088.        Update archive.
  4089.      *
  4090.        
  4091.        Rewrites the index pages to reflect the update.
  4092.      *
  4093.        
  4094.        Writes a new database file containing the new state of the archive
  4095.        and all (new) resource settings.
  4096.        
  4097.    
  4098.    
  4099.    Normally, knowing all the previous steps is unnecessary. However, it
  4100.    may be useful to be aware of them if unexpected behavior, or errors,
  4101.    occur.
  4102.      _________________________________________________________________
  4103.    
  4104. Archive Integrity
  4105.  
  4106.    
  4107.    
  4108.    MHonArc applies safeguards to try to insure that a mail archive does
  4109.    not get corrupted due to exceptional circumstances. MHonArc does the
  4110.    following to insure a mail archive does not get corrupted:
  4111.      *
  4112.        
  4113.        MHonArc creates a lock file, ".mhonarc.lck", when
  4114.        creating/updating an archive. The lock file insures that only one
  4115.        MHonArc process is modifying an archive at any given moment. The
  4116.        -locktries command-line option, or the M2H_LOCKTRIES environment
  4117.        variable, allows you to control how long a given MHonArc process
  4118.        will wait if an archive is currently locked. If MHonArc can not
  4119.        lock the archive after the specified number of tries, MHonArc will
  4120.        exit, unless the -force option is specified.
  4121.      *
  4122.        
  4123.        MHonArc will ignore the following signals once messages are
  4124.        actually being written to disk: SIGABRT, SIGHUP, SIGINT, SIGQUIT,
  4125.        SIGPIPE, SIGTERM. Possible archive corruption can still occur if a
  4126.        SIGKILL signal is received since SIGKILLs are uncatchable. A
  4127.        SIGKILL will also prevent MHonArc from deleting the lock file.
  4128.        
  4129.    
  4130.      _________________________________________________________________
  4131.    
  4132. File Formats 
  4133.  
  4134.   DATABASE FILE
  4135.   
  4136.    
  4137.    
  4138.    The MHonArc database file is actual Perl code. MHonArc requires it
  4139.    like any other Perl library to load in the contents of the database.
  4140.    
  4141.    CAUTION
  4142.           
  4143.           
  4144.           You should never modify the database file by hand. Changing the
  4145.           file by hand could cause future incorrect/unpredictable
  4146.           behavior when processing the archive.
  4147.           
  4148.   INDEX AND MESSAGE FILES
  4149.   
  4150.    
  4151.    
  4152.    The indexes and message files are legal HTML documents. However,
  4153.    manual editting of the documents is discouraged. The documents contain
  4154.    special comment declarations. The comment declarations act as markers
  4155.    which allow MHonArc to correctly edit the documents when needed.
  4156.    
  4157.    The comment declarations look like the following:
  4158. <!--X-Body-Begin-->
  4159. <!--X-User-Header-->
  4160. <!--X-User-Header-End-->
  4161. <!--X-TopPNI-->
  4162. ...
  4163.  
  4164.   DERIVED FILES
  4165.   
  4166.    
  4167.    
  4168.    Derived files are files that are generated by the MIME filters. These
  4169.    files are created when the data being processed in messages cannot be
  4170.    converted to HTML (eg. images, postscript, video, binaries). The
  4171.    format of these files depend on the content-type of the data.
  4172.      _________________________________________________________________
  4173.    
  4174. Notes 
  4175.  
  4176.      *
  4177.        
  4178.        Here is the explicit order of decreasing precedence when setting
  4179.        resources/options:
  4180.           + command-line options (highest precedence)
  4181.           + resource file
  4182.           + database file
  4183.           +
  4184.             
  4185.             environment variables (lowest precedence)
  4186.      *
  4187.        
  4188.        Mail thread detection is dependent upon the mail messages
  4189.        containing the message id(s) of referenced messages. Most mailers
  4190.        reply function will automatically include the message id of the
  4191.        message being replied to.
  4192.      *
  4193.        
  4194.        All mail message being converted into HTML are stored in memory
  4195.        before they are written to disk. This can eat up much memory if
  4196.        many mail messages are being converted. If you are processing
  4197.        multiple mailboxes/folders and worried about memory, you can try
  4198.        the following:
  4199.           + Invoke MHonArc on each one separately using the -add option.
  4200.           +
  4201.             
  4202.             Or, invoke MHonArc with the -savemem option.
  4203.      *
  4204.        
  4205.        The database file, and the index pages, are completely rewritten
  4206.        evertime new messages are added. This may cause slight slow-downs
  4207.        when archives become very large.
  4208.      *
  4209.        
  4210.        When reading MH mail folders, mail message are assumed to have
  4211.        numeric filenames.
  4212.      *
  4213.        
  4214.        When sorting by date, MHonArc tries to use the date listed in the
  4215.        first Received field of the message. If no Received field exists,
  4216.        than the Date field is used.
  4217.      *
  4218.        
  4219.        No distinction is made, in the output, on which messages came from
  4220.        which mail folder if multiple mail folders are processed.
  4221.      *
  4222.        
  4223.        MHonArc can probably be modified to handle other types of mailers
  4224.        (which has been done since the original version only supported MH
  4225.        mail folders). The MSGSEP resource gives flexibility in processing
  4226.        Unix style mailbox files.
  4227.        
  4228.    
  4229.      _________________________________________________________________
  4230.    
  4231.  
  4232.      _________________________________________________________________
  4233.    
  4234.                                  DIAGNOSTICS
  4235.                                        
  4236.    
  4237.    
  4238.    Three types of messages exist in MHonArc: Informative messages,
  4239.    Warnings, and Errors. Informative messages give you the current
  4240.    status of MHonArc's execution. Warnings signify undesired conditions,
  4241.    but are not critical in MHonArc's exection. Errors signify critical
  4242.    conditions that inhibit MHonArc from finishing its task.
  4243.    
  4244.    Another set of messages exists that are generated from the Perl
  4245.    interpreter itself. MHonArc tries its best to catch any conditions
  4246.    that may cause Perl to abnormally abort, but conditions may arise
  4247.    where this is not possible.
  4248.    
  4249.    This section describes the various diagnostics MHonArc may produce and
  4250.    messages Perl may produce.
  4251.      _________________________________________________________________
  4252.    
  4253. Informative messages 
  4254.  
  4255.    
  4256.    
  4257.    Informative messages may be suppressed via the -quiet command-line
  4258.    option. Only the more important Informative messages are listed here.
  4259.    
  4260.   COULD NOT PROCESS MESSAGE WITH GIVEN CONTENT-TYPE: ...
  4261.   
  4262.    
  4263.    
  4264.    MHonArc will output this statement in filtered mail messages for
  4265.    content-types it is unable to process. See Default Filters in MIME for
  4266.    content-types that MHonArc supports by default. See Writing Filters
  4267.    for adding new filters into MHonArc.
  4268.    
  4269.    This is the only Informative message that does not go to standard
  4270.    output, but into the actual filtered mail message.
  4271.    
  4272.   NO NEW MESSAGES
  4273.   
  4274.    
  4275.    
  4276.    No mail messages exist when performing an add operation to an archive.
  4277.    This can occur if an empty MH mail folder, or empty mailbox file, is
  4278.    passed to MHonArc.
  4279.    
  4280.   REQUIRING MIME FILTER LIBRARIES ...
  4281.   
  4282.    
  4283.    
  4284.    Indicates MHonArc is loading external libraries for filtering mail
  4285.    messages. MHonArc will output each library it loads. See MIME for more
  4286.    information of filter libraries.
  4287.    
  4288.   TRYING TO LOCK MAIL ARCHIVE ...
  4289.   
  4290.    
  4291.    
  4292.    The statement means that a lock file is in place for the archive you
  4293.    are trying to update. Normally, an existing lock file implies that
  4294.    another MHonArc process is currently using the archive, and other
  4295.    MHonArc processes will wait awhile to see if the archive will be
  4296.    unlocked.
  4297.    
  4298.    However, there are times when a lock file exists, but no MHonArc
  4299.    process is modifying the archive. This can occur if MHonArc is
  4300.    abnormally terminated. If you know that no other MHonArc process is
  4301.    editting the archive you are try to modify, then manually remove the
  4302.    lock file or use the -force option.
  4303.    
  4304.    See Archive Integrity for more information.
  4305.      _________________________________________________________________
  4306.    
  4307. Warnings 
  4308.  
  4309.    
  4310.    
  4311.    Warning messages denote some undesired event occurred, but the event
  4312.    is not severe enough to cause program termination.
  4313.    
  4314.   WARNING: COULD NOT FIND DATE FOR MESSAGE
  4315.   
  4316.    
  4317.    
  4318.    MHonArc was unable to find a received/sent date for a mail message.
  4319.    With respect to other mail messages, a message with no received/sent
  4320.    date is first in chronological order.
  4321.    
  4322.   WARNING: DATABASE (<DBVERSION>) != PROGRAM (<PRGVERSION>) VERSION
  4323.   
  4324.    
  4325.    
  4326.    Indicates that the version of MHonArc updating an archive is different
  4327.    from the version of MHonArc that created the database file. Problems
  4328.    can arise if the database file changes in format from different
  4329.    version of MHonArc. See the release notes of the MHonArc distribution
  4330.    if changes in the databse format has effects on older archives.
  4331.    
  4332.   WARNING: UNABLE TO CREATE <OUTDIR>/<DBFILE>
  4333.   
  4334.    
  4335.    
  4336.    Indicates MHonArc was unable to create the database file <dbfile> for
  4337.    the mail archive created/modified in <outdir>. This message can occur
  4338.    if <outdir> permissions changed during MHonArc execution, the existing
  4339.    <dbfile> is read-only, or the file system is full.
  4340.    
  4341.    This message can be severe because no future add operations can be
  4342.    performed to the archive.
  4343.    
  4344.   WARNING: UNABLE TO OPEN FOOTER: <FOOTER>
  4345.   
  4346.    
  4347.    
  4348.    MHonArc was unable to open the footer file, <footer>, for inclusion
  4349.    into the index page. Make sure <footer> exists, and is readable by
  4350.    you.
  4351.    
  4352.   WARNING: UNABLE TO OPEN HEADER: <HEADER>
  4353.   
  4354.    
  4355.    
  4356.    MHonArc was unable to open the header file, <header>, for inclusion
  4357.    into the index page. Make sure <header> exists, and is readable by
  4358.    you.
  4359.    
  4360.   WARNING: UNABLE TO OPEN <FOLDER>
  4361.   
  4362.    
  4363.    
  4364.    MHonArc was unable to open the specified mail <folder> for reading.
  4365.    Make sure <folder> exists and is readable (and executable if a
  4366.    directory) by you.
  4367.    
  4368.   WARNING: UNABLE TO OPEN MESSAGE: <FOLDER>/<MESSAGE>
  4369.   
  4370.    
  4371.    
  4372.    MHonArc was unable to open the specified MH mail message
  4373.    <folder>/<message> for reading. Make sure <folder>/<message> exists
  4374.    and is readable by you.
  4375.    
  4376.   WARNING: UNABLE TO OPEN RESOURCE FILE: <FILE>
  4377.   
  4378.    
  4379.    
  4380.    MHonArc was unable to open the resource file, <file>, for reading.
  4381.    Make sure <file> exists, and is readable by you.
  4382.    
  4383.   WARNING: UNDEFINED TIME ZONE: "<TIMEZONE>"
  4384.   
  4385.    
  4386.    
  4387.    MHonArc has found an unrecognized timezone acronym, <timezone>, in a
  4388.    mail message. You can tell MHonArc about other timezone acronyms, and
  4389.    their hour offset to UTC, by using the TIMEZONES resource element of
  4390.    the Resource File.
  4391.    
  4392.    The timezone UTC (or GMT) is used for an undefined timezone acronym
  4393.      _________________________________________________________________
  4394.    
  4395. Errors 
  4396.  
  4397.    
  4398.    
  4399.    Errors denote conditions that cause MHonArc to abort execution.
  4400.    
  4401.    Some error conditions may cause the MHonArc archive to become
  4402.    corrupted. If the error occurs when MHonArc is writing files, you may
  4403.    have to recreate the archive from the original messages.
  4404.    
  4405.   ERROR: DATABASE READ ERROR OF <DBFILE>
  4406.   
  4407.    
  4408.    
  4409.    An error occured when trying to read an archive's database. The error
  4410.    can occur if the database file is not readable or the file got
  4411.    corrupted.
  4412.    
  4413.   ERROR: UNABLE TO CREATE <FILE>
  4414.   
  4415.    
  4416.    
  4417.    MHonArc was unable to create <file>. This message can occur if the
  4418.    directory being written to is not writable, a read-only file with the
  4419.    same name exists, or the file system is full.
  4420.    
  4421.   ERROR: UNABLE TO CREATE <LOCKFILE> AFTER <#> TRIES
  4422.   
  4423.    
  4424.    
  4425.    The statement means that a lock file is in place for the archive you
  4426.    are trying to update.
  4427.    
  4428.    Sometimes a lock file exists, but no MHonArc process is modifying the
  4429.    archive. This can occur if MHonArc is abnormally terminated. If you
  4430.    know that no other MHonArc process is editting the archive you are try
  4431.    to modify, then manually remove the lock file or use the -force
  4432.    option.
  4433.    
  4434.   ERROR: UNABLE TO OPEN <FILE>
  4435.   
  4436.    
  4437.    
  4438.    MHonArc was unable to open <file> for reading. Make sure <file>
  4439.    exists, and is readable by you.
  4440.    
  4441.   ERROR: UNABLE TO REQUIRE NEWGETOPT.PL
  4442.   
  4443.    
  4444.    
  4445.    The newgetopt.pl library is needed for MHonArc to parse the
  4446.    command-line. newgetopt.pl is part of the standard Perl distribution.
  4447.    Make sure Perl has been correctly installed at your site.
  4448.    
  4449.   ERROR: UNABLE TO REQUIRE TIMELOCAL.PL
  4450.   
  4451.    
  4452.    
  4453.    The timelocal.pl library is needed for MHonArc to process dates in
  4454.    messages. timelocal.pl is part of the standard Perl distribution. Make
  4455.    sure Perl has been correctly installed at your site.
  4456.    
  4457.   ERROR: UNABLE TO REQUIRE <FILE>
  4458.   
  4459.    
  4460.    
  4461.    This message signifies MHonArc was unable to require the library
  4462.    <file>. Make sure you properly installed MHonArc via the
  4463.    installation program. If <file> is your own custom filter, make sure
  4464.    you properly registered it in the Resource File. See also Specifying
  4465.    Filters and the PERLINC resource element.
  4466.      _________________________________________________________________
  4467.    
  4468. Perl Messages 
  4469.  
  4470.    
  4471.    
  4472.    Generally, if execution is aborted and the following error messages
  4473.    appear, then you will have to manually delete the lock file since
  4474.    MHonArc will not have the chance to delete the file.
  4475.    
  4476.   CAN'T LOCATE <FILE> IN @INC AT <FILE> LINE <NUMBER>.
  4477.   
  4478.    
  4479.    
  4480.    A library that MHonArc tried to load was not found in the Perl include
  4481.    search paths. This error usually implies that MHonArc was not
  4482.    installed correctly. Make sure that MHonArc was installed via the
  4483.    install.me program that is provided in the MHonArc distribution.
  4484.    
  4485.   <FILE> DID NOT RETURN A TRUE VALUE AT <FILE> LINE <NUMBER>.
  4486.   
  4487.    
  4488.    
  4489.    If you are using your own MIME filters with MHonArc, make sure the
  4490.    library files return 1.
  4491.      _________________________________________________________________
  4492.    
  4493.  
  4494.      _________________________________________________________________
  4495.    
  4496.                                   GLOSSARY
  4497.                                        
  4498.    HTML
  4499.           
  4500.           
  4501.           Hypertext Markup Language. HTML is the main document markup
  4502.           language for the World Wide Web.
  4503.           
  4504.    MIME
  4505.           
  4506.           
  4507.           Multipurpose Internet Mail Extensions. MIME allows the
  4508.           transmission of non-ASCII data, and mixed content data, in
  4509.           electronic mail messages.
  4510.           
  4511.    MH
  4512.           
  4513.           
  4514.           Message Handler. MH is a free message handling system initially
  4515.           developed by the RAND Corporation, with subsequent development
  4516.           done at the University of Califonia: Irvine.
  4517.           
  4518.    Perl
  4519.           
  4520.           
  4521.           Practical Extraction and Report Language. Perl is an
  4522.           interpreted programming language suited for processing text and
  4523.           generating reports.
  4524.           
  4525.    SGML
  4526.           
  4527.           
  4528.           Standard Generalized Markup Language. SGML is a language for
  4529.           document representation.
  4530.           
  4531.    
  4532.      _________________________________________________________________
  4533.    
  4534.  
  4535.      _________________________________________________________________
  4536.    
  4537.                                   CONTACTS
  4538.                                        
  4539.    
  4540.      _________________________________________________________________
  4541.    
  4542. Mailing List 
  4543.  
  4544.    
  4545.    
  4546.    A mailing list, mhonarc@rosat.mpe-garching.mpg.de, is available to
  4547.    provide a discussion forum on the usage and development of MHonArc.
  4548.    Appropriate topics for the list include: usage questions, bug reports,
  4549.    behavioral enhancements, documentation bugs, and general help.
  4550.    
  4551.    To subscribe to the mailing list, send mail to
  4552.    mhonarc-request@rosat.mpe-garching.mpg.de with the command,
  4553. subscribe
  4554.  
  4555.    
  4556.    
  4557.    as the message body.
  4558.    
  4559.    If you send mail mhonarc@rosat.mpe-garching.mpg.de, your message will
  4560.    be distributed to all subscribers on the list.
  4561.    
  4562.    The mailing list is archived by Majordomo. You can also use the WWW to
  4563.    access the archive (with full text search using glimpse) at
  4564.    <URL:http://www.rosat.mpe-garching.mpg.de/mailing-lists/mhonarc/>
  4565.      _________________________________________________________________
  4566.    
  4567. People 
  4568.  
  4569.    Earl Hood
  4570.           ehood@convex.com
  4571.           
  4572.           
  4573.           Main developer of MHonArc. Contact for bug reports, behavioral
  4574.           enhancements, documentation bugs, and Unix usage issues.
  4575.           
  4576.    Steve Pacenka
  4577.           sp17@cornell.edu
  4578.           
  4579.           
  4580.           Contributing developer. Worked on isolating code that would
  4581.           conflict with MS-DOS. Contact for MS-DOS installation problems
  4582.           or MS-DOS usage issues.
  4583.           
  4584.    Achim Bohnet
  4585.           ach@rosat.mpe-garching.mpg.de
  4586.           
  4587.           
  4588.           Contributing developer. Administrator, and maintainer, of the
  4589.           MHonArc mailing list.
  4590.           
  4591.    
  4592.      _________________________________________________________________
  4593.    
  4594.